Issue 11513 Added onCreateDefault to ATTRSETVALUETYPE column and modified M_PRODUCT_ATSETVALTYPE_CHK constraint and message.
authorRafa Roda Palacios <rafael.roda@openbravo.com>
Wed, 03 Feb 2010 23:00:50 +0100
changeset 6094 de65edc16ba8
parent 6093 3b83864e518e
child 6095 2acb489b0711
Issue 11513 Added onCreateDefault to ATTRSETVALUETYPE column and modified M_PRODUCT_ATSETVALTYPE_CHK constraint and message.
src-db/database/model/tables/M_PRODUCT.xml
src-db/database/sourcedata/AD_MESSAGE.xml
--- a/src-db/database/model/tables/M_PRODUCT.xml	Wed Feb 03 22:57:58 2010 +0100
+++ b/src-db/database/model/tables/M_PRODUCT.xml	Wed Feb 03 23:00:50 2010 +0100
@@ -279,7 +279,7 @@
       </column>
       <column name="ATTRSETVALUETYPE" primaryKey="false" required="false" type="VARCHAR" size="60" autoIncrement="false">
         <default/>
-        <onCreateDefault/>
+        <onCreateDefault><![CDATA[CASE WHEN M_ATTRIBUTESETINSTANCE_ID IS NOT NULL THEN 'D' ELSE NULL END]]></onCreateDefault>
       </column>
       <foreign-key foreignTable="AD_ORG" name="AD_ORG_MPRODUCT">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
@@ -354,7 +354,7 @@
         <unique-column name="AD_CLIENT_ID"/>
         <unique-column name="VALUE"/>
       </unique>
-      <check name="M_PRODUCT_ATSETVALTYPE_CHK"><![CDATA[(M_ATTRIBUTESETINSTANCE_ID IS NOT NULL) OR (ATTRSETVALUETYPE IS NULL)]]></check>
+      <check name="M_PRODUCT_ATSETVALTYPE_CHK"><![CDATA[(M_ATTRIBUTESETINSTANCE_ID IS NULL) OR (ATTRSETVALUETYPE IS NOT NULL)]]></check>
       <check name="M_PRODUCT_DISCONTINUED_CHECK"><![CDATA[DISCONTINUED IN ('Y', 'N')]]></check>
       <check name="M_PRODUCT_ENFORCE_ATTRIBUT_CHK"><![CDATA[ENFORCE_ATTRIBUTE IN ('Y', 'N')]]></check>
       <check name="M_PRODUCT_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
--- a/src-db/database/sourcedata/AD_MESSAGE.xml	Wed Feb 03 22:57:58 2010 +0100
+++ b/src-db/database/sourcedata/AD_MESSAGE.xml	Wed Feb 03 23:00:50 2010 +0100
@@ -30834,7 +30834,7 @@
 <!--69155DDA0CA84861A828892DB4DC2E7C-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--69155DDA0CA84861A828892DB4DC2E7C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--69155DDA0CA84861A828892DB4DC2E7C-->  <VALUE><![CDATA[M_PRODUCT_ATSETVALTYPE_CHK]]></VALUE>
-<!--69155DDA0CA84861A828892DB4DC2E7C-->  <MSGTEXT><![CDATA[Blank the Attribute Set Value Type field value before deleting the Attribute Set Value field value.]]></MSGTEXT>
+<!--69155DDA0CA84861A828892DB4DC2E7C-->  <MSGTEXT><![CDATA[Please specify in the Use Attribute Set Value As field how the Attribute Set Value defined will be used.]]></MSGTEXT>
 <!--69155DDA0CA84861A828892DB4DC2E7C-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
 <!--69155DDA0CA84861A828892DB4DC2E7C-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--69155DDA0CA84861A828892DB4DC2E7C--></AD_MESSAGE>