[hqltables] Accepts false positive
authorAugusto Mauch <augusto.mauch@openbravo.com>
Thu, 19 Jun 2014 19:06:46 +0200
changeset 562 e1f36e34cefd
parent 561 9d47c01b68fa
child 563 6df910d39bed
[hqltables] Accepts false positive

New condition of check constraint can never fail because this data combination cannot happen with existing data.
model/src-db/database/model/tables/AD_TABLE.xml
--- a/model/src-db/database/model/tables/AD_TABLE.xml	Wed Jun 04 17:47:11 2014 +0200
+++ b/model/src-db/database/model/tables/AD_TABLE.xml	Thu Jun 19 19:06:46 2014 +0200
@@ -176,7 +176,8 @@
         <unique-column name="TREETYPE"/>
       </unique>
       <check name="AD_TABLE_CLASSNAME_CHK"><![CDATA[((UPPER((DATAORIGINTYPE)) = 'DATASOURCE') OR (UPPER((DATAORIGINTYPE)) = 'HQL')) OR (CLASSNAME IS NOT NULL)]]></check>
-      <check name="AD_TABLE_DATASOURCE_CHK"><![CDATA[((UPPER((DATAORIGINTYPE)) = 'TABLE') OR (OBSERDS_DATASOURCE_ID IS NOT NULL)) OR (HQLQUERY IS NOT NULL)]]></check>
+      <check name="AD_TABLE_DATASOURCE_CHK"><![CDATA[(UPPER((DATAORIGINTYPE)) <> 'DATASOURCE') OR (OBSERDS_DATASOURCE_ID IS NOT NULL)]]></check>
+      <check name="AD_TABLE_HQL_CHK"><![CDATA[(UPPER((DATAORIGINTYPE)) <> 'HQL') OR (HQLQUERY 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>