Regenerate DAO files to have 'where' fields defined
[civicrm-core.git] / CRM / Core / DAO / EntityFile.php
index 3a8430b3fa0c2221bd52b3682afae6ae9b901ba5..26069113cbefad1604991e12fdf447bcfd8963eb 100644 (file)
@@ -2,11 +2,11 @@
 
 /**
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2018
+ * @copyright CiviCRM LLC (c) 2004-2019
  *
  * Generated from xml/schema/CRM/Core/EntityFile.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:354c22131251fde259f5b796e102fccf)
+ * (GenCodeChecksum:febc5ccbfb965f8f4ba8477d4db0e5f3)
  */
 
 /**
@@ -19,14 +19,14 @@ class CRM_Core_DAO_EntityFile extends CRM_Core_DAO {
    *
    * @var string
    */
-  static $_tableName = 'civicrm_entity_file';
+  public static $_tableName = 'civicrm_entity_file';
 
   /**
    * Should CiviCRM log any modifications to this table in the civicrm_log table.
    *
    * @var bool
    */
-  static $_log = TRUE;
+  public static $_log = TRUE;
 
   /**
    * primary key
@@ -72,7 +72,7 @@ class CRM_Core_DAO_EntityFile extends CRM_Core_DAO {
    */
   public static function getReferenceColumns() {
     if (!isset(Civi::$statics[__CLASS__]['links'])) {
-      Civi::$statics[__CLASS__]['links'] = static ::createReferenceColumns(__CLASS__);
+      Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
       Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'file_id', 'civicrm_file', 'id');
       Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Dynamic(self::getTableName(), 'entity_id', NULL, 'id', 'entity_table');
       CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
@@ -94,6 +94,7 @@ class CRM_Core_DAO_EntityFile extends CRM_Core_DAO {
           'title' => ts('Entity File ID'),
           'description' => ts('primary key'),
           'required' => TRUE,
+          'where' => 'civicrm_entity_file.id',
           'table_name' => 'civicrm_entity_file',
           'entity' => 'EntityFile',
           'bao' => 'CRM_Core_DAO_EntityFile',
@@ -106,6 +107,7 @@ class CRM_Core_DAO_EntityFile extends CRM_Core_DAO {
           'description' => ts('physical tablename for entity being joined to file, e.g. civicrm_contact'),
           'maxlength' => 64,
           'size' => CRM_Utils_Type::BIG,
+          'where' => 'civicrm_entity_file.entity_table',
           'table_name' => 'civicrm_entity_file',
           'entity' => 'EntityFile',
           'bao' => 'CRM_Core_DAO_EntityFile',
@@ -117,6 +119,7 @@ class CRM_Core_DAO_EntityFile extends CRM_Core_DAO {
           'title' => ts('Entity ID'),
           'description' => ts('FK to entity table specified in entity_table column.'),
           'required' => TRUE,
+          'where' => 'civicrm_entity_file.entity_id',
           'table_name' => 'civicrm_entity_file',
           'entity' => 'EntityFile',
           'bao' => 'CRM_Core_DAO_EntityFile',
@@ -128,6 +131,7 @@ class CRM_Core_DAO_EntityFile extends CRM_Core_DAO {
           'title' => ts('File'),
           'description' => ts('FK to civicrm_file'),
           'required' => TRUE,
+          'where' => 'civicrm_entity_file.file_id',
           'table_name' => 'civicrm_entity_file',
           'entity' => 'EntityFile',
           'bao' => 'CRM_Core_DAO_EntityFile',
@@ -213,15 +217,16 @@ class CRM_Core_DAO_EntityFile extends CRM_Core_DAO {
         'localizable' => FALSE,
         'sig' => 'civicrm_entity_file::0::entity_table::entity_id',
       ],
-      'index_entity_file_id' => [
-        'name' => 'index_entity_file_id',
+      'UI_entity_table_entity_id_file_id' => [
+        'name' => 'UI_entity_table_entity_id_file_id',
         'field' => [
           0 => 'entity_table',
           1 => 'entity_id',
           2 => 'file_id',
         ],
         'localizable' => FALSE,
-        'sig' => 'civicrm_entity_file::0::entity_table::entity_id::file_id',
+        'unique' => TRUE,
+        'sig' => 'civicrm_entity_file::1::entity_table::entity_id::file_id',
       ],
     ];
     return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;