Related to issue 0023996: Fixes API change
authorAugusto Mauch <augusto.mauch@openbravo.com>
Wed, 05 Jun 2013 18:05:53 +0200
changeset 498 346b87db66a1
parent 497 4373f5d0d5dd
child 499 63a874549bf3
Related to issue 0023996: Fixes API change

This API change is a false positive. Two contraints have been added to the AD_TABLE table, but all registers of all openbravo instances are going to comply with it, because nobody has created yet a Datasource Based Table.
model/src-db/database/model/tables/AD_TABLE.xml
--- a/model/src-db/database/model/tables/AD_TABLE.xml	Wed May 22 11:02:37 2013 +0200
+++ b/model/src-db/database/model/tables/AD_TABLE.xml	Wed Jun 05 18:05:53 2013 +0200
@@ -156,6 +156,8 @@
       <unique name="AD_TABLE_TREETYPE_UN">
         <unique-column name="TREETYPE"/>
       </unique>
+      <check name="AD_TABLE_CLASSNAME_CHK"><![CDATA[(UPPER((DATAORIGINTYPE)) = 'DATASOURCE') OR (CLASSNAME IS NOT NULL)]]></check>
+      <check name="AD_TABLE_DATASOURCE_CHK"><![CDATA[(UPPER((DATAORIGINTYPE)) = 'TABLE') OR (OBSERDS_DATASOURCE_ID IS NOT NULL)]]></check>
       <check name="AD_TABLE_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
       <check name="AD_TABLE_ISAUDITINS_CHK"><![CDATA[ISAUDITINSERTS IN ('Y', 'N')]]></check>
       <check name="AD_TABLE_ISDELETEABLE_CHK"><![CDATA[ISDELETEABLE IN ('Y', 'N')]]></check>