X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=xml%2Ftemplates%2Fdao.tpl;h=be5768e58a310e52faa7f1321b784ba614db14d3;hb=e6662685fd5a0b66e910e6c9d840f78af1727219;hp=f4a5cf1e9e224d83dd579d3311f3b50f1e3e8282;hpb=53128a92d19ec8f0526b48a4a0c044bb0d671d84;p=civicrm-core.git diff --git a/xml/templates/dao.tpl b/xml/templates/dao.tpl index f4a5cf1e9e..be5768e58a 100644 --- a/xml/templates/dao.tpl +++ b/xml/templates/dao.tpl @@ -2,9 +2,9 @@ /* +--------------------------------------------------------------------+ - | CiviCRM version 4.4 | + | CiviCRM version 4.5 | +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2013 | + | Copyright CiviCRM LLC (c) 2004-2014 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -29,7 +29,7 @@ /** * * @package CRM - * @copyright CiviCRM LLC (c) 2004-2013 + * @copyright CiviCRM LLC (c) 2004-2014 * * Generated from {$table.sourceFile} * {$generated} @@ -137,19 +137,18 @@ class {$table.className} extends CRM_Core_DAO {ldelim} * * @static * @access public - * @return array of CRM_Core_EntityReference + * @return array of CRM_Core_Reference_Interface */ static function getReferenceColumns() {ldelim} if (!self::$_links) {ldelim} - self::$_links = array( + self::$_links = static::createReferenceColumns(__CLASS__); {foreach from=$table.foreignKey item=foreign} - new CRM_Core_EntityReference(self::getTableName(), '{$foreign.name}', '{$foreign.table}', '{$foreign.key}'), + self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName(), '{$foreign.name}', '{$foreign.table}', '{$foreign.key}'); {/foreach} {foreach from=$table.dynamicForeignKey item=foreign} - new CRM_Core_EntityReference(self::getTableName(), '{$foreign.idColumn}', NULL, '{$foreign.key|default:'id'}', '{$foreign.typeColumn}'), + self::$_links[] = new CRM_Core_Reference_Dynamic(self::getTableName(), '{$foreign.idColumn}', NULL, '{$foreign.key|default:'id'}', '{$foreign.typeColumn}'); {/foreach} - ); {rdelim} return self::$_links; {rdelim}