DAO function to list all foreign key references to a table
[civicrm-core.git] / xml / schema / PCP / PCPBlock.xml
index 64dd578d3f4e8979487f10988b6e4c84a0c4be0c..fbd6c504ee37bc6683f70dfc465a7a75f068aa18 100644 (file)
       <comment>FK to civicrm_contribution_page.id OR civicrm_event.id</comment>
       <add>2.2</add>
   </field>
+  <dynamicForeignKey>
+      <idColumn>entity_id</idColumn>
+      <typeColumn>entity_table</typeColumn>
+      <add>2.2</add>
+  </dynamicForeignKey>
   <foreignKey> 
       <name>entity_id</name> 
       <table>civicrm_contribution_page</table> 
       <comment>The entity that this pcp targets</comment>
       <add>4.1</add>
   </field>
+  <dynamicForeignKey>
+      <idColumn>target_entity_id</idColumn>
+      <!-- FIXME: typename and not tablename? -->
+      <typeColumn>target_entity_type</typeColumn>
+      <add>4.1</add>
+  </dynamicForeignKey>
   <field>  
       <name>supporter_profile_id</name>  
       <type>int unsigned</type>