Modified onCreateDefault of AD tables, to select the correct module id
authorAntonio Moreno <antonio.moreno@openbravo.com>
Mon, 15 Dec 2008 10:20:07 +0000
changeset 2323 696b6f8067e8
parent 2322 a8220999735f
child 2324 e9d8d0548d2a
Modified onCreateDefault of AD tables, to select the correct module id
src-db/database/model/tables/AD_AUXILIARINPUT.xml
src-db/database/model/tables/AD_CALLOUT.xml
src-db/database/model/tables/AD_CLIENTMODULE.xml
src-db/database/model/tables/AD_COLUMN.xml
src-db/database/model/tables/AD_DATASET.xml
src-db/database/model/tables/AD_DATASET_COLUMN.xml
src-db/database/model/tables/AD_DATASET_TABLE.xml
src-db/database/model/tables/AD_ELEMENT.xml
src-db/database/model/tables/AD_FIELD.xml
src-db/database/model/tables/AD_FIELDGROUP.xml
src-db/database/model/tables/AD_FORM.xml
src-db/database/model/tables/AD_IMPFORMAT.xml
src-db/database/model/tables/AD_MENU.xml
src-db/database/model/tables/AD_MESSAGE.xml
src-db/database/model/tables/AD_MODEL_OBJECT.xml
src-db/database/model/tables/AD_MODULE_DBPREFIX.xml
src-db/database/model/tables/AD_MODULE_DEPENDENCY.xml
src-db/database/model/tables/AD_MODULE_LOG.xml
src-db/database/model/tables/AD_MODULE_TRL.xml
src-db/database/model/tables/AD_ORGMODULE.xml
src-db/database/model/tables/AD_PACKAGE.xml
src-db/database/model/tables/AD_PROCESS.xml
src-db/database/model/tables/AD_REFERENCE.xml
src-db/database/model/tables/AD_REF_DATA_LOADED.xml
src-db/database/model/tables/AD_TAB.xml
src-db/database/model/tables/AD_TEXTINTERFACES.xml
src-db/database/model/tables/AD_VAL_RULE.xml
src-db/database/model/tables/AD_WINDOW.xml
src-db/database/model/tables/AD_WORKFLOW.xml
--- a/src-db/database/model/tables/AD_AUXILIARINPUT.xml	Mon Dec 15 09:55:05 2008 +0000
+++ b/src-db/database/model/tables/AD_AUXILIARINPUT.xml	Mon Dec 15 10:20:07 2008 +0000
@@ -47,7 +47,7 @@
       </column>
       <column name="AD_MODULE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default><![CDATA[0]]></default>
-        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0']]></onCreateDefault>
+        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0' AND TYPE='M']]></onCreateDefault>
       </column>
       <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADAUXILIARINPUT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
--- a/src-db/database/model/tables/AD_CALLOUT.xml	Mon Dec 15 09:55:05 2008 +0000
+++ b/src-db/database/model/tables/AD_CALLOUT.xml	Mon Dec 15 10:20:07 2008 +0000
@@ -43,7 +43,7 @@
       </column>
       <column name="AD_MODULE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default><![CDATA[0]]></default>
-        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0']]></onCreateDefault>
+        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0' AND TYPE='M']]></onCreateDefault>
       </column>
       <foreign-key foreignTable="AD_CLIENT" name="ADCALLOUT_FK_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
--- a/src-db/database/model/tables/AD_CLIENTMODULE.xml	Mon Dec 15 09:55:05 2008 +0000
+++ b/src-db/database/model/tables/AD_CLIENTMODULE.xml	Mon Dec 15 10:20:07 2008 +0000
@@ -31,7 +31,7 @@
       </column>
       <column name="AD_MODULE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
-        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0']]></onCreateDefault>
+        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0' AND TYPE='M']]></onCreateDefault>
       </column>
       <column name="VERSION" primaryKey="false" required="true" type="VARCHAR" size="10" autoIncrement="false">
         <default/>
--- a/src-db/database/model/tables/AD_COLUMN.xml	Mon Dec 15 09:55:05 2008 +0000
+++ b/src-db/database/model/tables/AD_COLUMN.xml	Mon Dec 15 10:20:07 2008 +0000
@@ -159,7 +159,7 @@
       </column>
       <column name="AD_MODULE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default><![CDATA[0]]></default>
-        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0']]></onCreateDefault>
+        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0' AND TYPE='M']]></onCreateDefault>
       </column>
       <column name="POSITION" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
         <default/>
--- a/src-db/database/model/tables/AD_DATASET.xml	Mon Dec 15 09:55:05 2008 +0000
+++ b/src-db/database/model/tables/AD_DATASET.xml	Mon Dec 15 10:20:07 2008 +0000
@@ -47,7 +47,7 @@
       </column>
       <column name="AD_MODULE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default><![CDATA[0]]></default>
-        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0']]></onCreateDefault>
+        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0' AND TYPE='M']]></onCreateDefault>
       </column>
       <column name="EXPORT" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
         <default><![CDATA[N]]></default>
--- a/src-db/database/model/tables/AD_DATASET_COLUMN.xml	Mon Dec 15 09:55:05 2008 +0000
+++ b/src-db/database/model/tables/AD_DATASET_COLUMN.xml	Mon Dec 15 10:20:07 2008 +0000
@@ -47,7 +47,7 @@
       </column>
       <column name="AD_MODULE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default><![CDATA[0]]></default>
-        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0']]></onCreateDefault>
+        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0' AND TYPE='M']]></onCreateDefault>
       </column>
       <foreign-key foreignTable="AD_COLUMN" name="ADCOLUMN_ADDSCOLUMN">
         <reference local="AD_COLUMN_ID" foreign="AD_COLUMN_ID"/>
--- a/src-db/database/model/tables/AD_DATASET_TABLE.xml	Mon Dec 15 09:55:05 2008 +0000
+++ b/src-db/database/model/tables/AD_DATASET_TABLE.xml	Mon Dec 15 10:20:07 2008 +0000
@@ -59,7 +59,7 @@
       </column>
       <column name="AD_MODULE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default><![CDATA[0]]></default>
-        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0']]></onCreateDefault>
+        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0' AND TYPE='M']]></onCreateDefault>
       </column>
       <foreign-key foreignTable="AD_DATASET" name="ADDATASET_ADDSTABLE">
         <reference local="AD_DATASET_ID" foreign="AD_DATASET_ID"/>
--- a/src-db/database/model/tables/AD_ELEMENT.xml	Mon Dec 15 09:55:05 2008 +0000
+++ b/src-db/database/model/tables/AD_ELEMENT.xml	Mon Dec 15 10:20:07 2008 +0000
@@ -71,7 +71,7 @@
       </column>
       <column name="AD_MODULE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default><![CDATA[0]]></default>
-        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0']]></onCreateDefault>
+        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0' AND TYPE='M']]></onCreateDefault>
       </column>
       <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADELEMENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
--- a/src-db/database/model/tables/AD_FIELD.xml	Mon Dec 15 09:55:05 2008 +0000
+++ b/src-db/database/model/tables/AD_FIELD.xml	Mon Dec 15 10:20:07 2008 +0000
@@ -107,7 +107,7 @@
       </column>
       <column name="AD_MODULE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default><![CDATA[0]]></default>
-        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0']]></onCreateDefault>
+        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0' AND TYPE='M']]></onCreateDefault>
       </column>
       <foreign-key foreignTable="AD_COLUMN" name="AD_COLUMN_FIELD">
         <reference local="AD_COLUMN_ID" foreign="AD_COLUMN_ID"/>
--- a/src-db/database/model/tables/AD_FIELDGROUP.xml	Mon Dec 15 09:55:05 2008 +0000
+++ b/src-db/database/model/tables/AD_FIELDGROUP.xml	Mon Dec 15 10:20:07 2008 +0000
@@ -39,7 +39,7 @@
       </column>
       <column name="AD_MODULE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default><![CDATA[0]]></default>
-        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0']]></onCreateDefault>
+        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0' AND TYPE='M']]></onCreateDefault>
       </column>
       <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADFIELDGROUP">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
--- a/src-db/database/model/tables/AD_FORM.xml	Mon Dec 15 09:55:05 2008 +0000
+++ b/src-db/database/model/tables/AD_FORM.xml	Mon Dec 15 10:20:07 2008 +0000
@@ -55,7 +55,7 @@
       </column>
       <column name="AD_MODULE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default><![CDATA[0]]></default>
-        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0']]></onCreateDefault>
+        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0' AND TYPE='M']]></onCreateDefault>
       </column>
       <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADFORM">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
--- a/src-db/database/model/tables/AD_IMPFORMAT.xml	Mon Dec 15 09:55:05 2008 +0000
+++ b/src-db/database/model/tables/AD_IMPFORMAT.xml	Mon Dec 15 10:20:07 2008 +0000
@@ -55,7 +55,7 @@
       </column>
       <column name="AD_MODULE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default><![CDATA[0]]></default>
-        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0']]></onCreateDefault>
+        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0' AND TYPE='M']]></onCreateDefault>
       </column>
       <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADIMPFORMAT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
--- a/src-db/database/model/tables/AD_MENU.xml	Mon Dec 15 09:55:05 2008 +0000
+++ b/src-db/database/model/tables/AD_MENU.xml	Mon Dec 15 10:20:07 2008 +0000
@@ -75,7 +75,7 @@
       </column>
       <column name="AD_MODULE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default><![CDATA[0]]></default>
-        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0']]></onCreateDefault>
+        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0' AND TYPE='M']]></onCreateDefault>
       </column>
       <foreign-key foreignTable="AD_ORG" name="AD_MENU_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
--- a/src-db/database/model/tables/AD_MESSAGE.xml	Mon Dec 15 09:55:05 2008 +0000
+++ b/src-db/database/model/tables/AD_MESSAGE.xml	Mon Dec 15 10:20:07 2008 +0000
@@ -51,7 +51,7 @@
       </column>
       <column name="AD_MODULE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default><![CDATA[0]]></default>
-        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0']]></onCreateDefault>
+        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0' AND TYPE='M']]></onCreateDefault>
       </column>
       <foreign-key foreignTable="AD_MODULE" name="MESSAGE_MODULE">
         <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
--- a/src-db/database/model/tables/AD_MODEL_OBJECT.xml	Mon Dec 15 09:55:05 2008 +0000
+++ b/src-db/database/model/tables/AD_MODEL_OBJECT.xml	Mon Dec 15 10:20:07 2008 +0000
@@ -75,7 +75,7 @@
       </column>
       <column name="AD_MODULE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
-        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0']]></onCreateDefault>
+        <onCreateDefault/>
       </column>
       <column name="OBJECT_TYPE" primaryKey="false" required="false" type="VARCHAR" size="1" autoIncrement="false">
         <default><![CDATA[S]]></default>
--- a/src-db/database/model/tables/AD_MODULE_DBPREFIX.xml	Mon Dec 15 09:55:05 2008 +0000
+++ b/src-db/database/model/tables/AD_MODULE_DBPREFIX.xml	Mon Dec 15 10:20:07 2008 +0000
@@ -35,7 +35,7 @@
       </column>
       <column name="AD_MODULE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
-        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0']]></onCreateDefault>
+        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0' AND TYPE='M']]></onCreateDefault>
       </column>
       <column name="NAME" primaryKey="false" required="true" type="VARCHAR" size="7" autoIncrement="false">
         <default/>
--- a/src-db/database/model/tables/AD_MODULE_DEPENDENCY.xml	Mon Dec 15 09:55:05 2008 +0000
+++ b/src-db/database/model/tables/AD_MODULE_DEPENDENCY.xml	Mon Dec 15 10:20:07 2008 +0000
@@ -35,7 +35,7 @@
       </column>
       <column name="AD_MODULE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
-        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0']]></onCreateDefault>
+        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0' AND TYPE='M']]></onCreateDefault>
       </column>
       <column name="AD_DEPENDENT_MODULE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
--- a/src-db/database/model/tables/AD_MODULE_LOG.xml	Mon Dec 15 09:55:05 2008 +0000
+++ b/src-db/database/model/tables/AD_MODULE_LOG.xml	Mon Dec 15 10:20:07 2008 +0000
@@ -35,7 +35,7 @@
       </column>
       <column name="AD_MODULE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
-        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0']]></onCreateDefault>
+        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0' AND TYPE='M']]></onCreateDefault>
       </column>
       <column name="AD_MODULE_VERSION_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
--- a/src-db/database/model/tables/AD_MODULE_TRL.xml	Mon Dec 15 09:55:05 2008 +0000
+++ b/src-db/database/model/tables/AD_MODULE_TRL.xml	Mon Dec 15 10:20:07 2008 +0000
@@ -7,7 +7,7 @@
       </column>
       <column name="AD_MODULE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
-        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0']]></onCreateDefault>
+        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0' AND TYPE='M']]></onCreateDefault>
       </column>
       <column name="AD_LANGUAGE" primaryKey="false" required="true" type="VARCHAR" size="6" autoIncrement="false">
         <default/>
--- a/src-db/database/model/tables/AD_ORGMODULE.xml	Mon Dec 15 09:55:05 2008 +0000
+++ b/src-db/database/model/tables/AD_ORGMODULE.xml	Mon Dec 15 10:20:07 2008 +0000
@@ -35,7 +35,7 @@
       </column>
       <column name="AD_MODULE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
-        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0']]></onCreateDefault>
+        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0' AND TYPE='M']]></onCreateDefault>
       </column>
       <column name="VERSION" primaryKey="false" required="true" type="VARCHAR" size="10" autoIncrement="false">
         <default/>
--- a/src-db/database/model/tables/AD_PACKAGE.xml	Mon Dec 15 09:55:05 2008 +0000
+++ b/src-db/database/model/tables/AD_PACKAGE.xml	Mon Dec 15 10:20:07 2008 +0000
@@ -27,7 +27,7 @@
       </column>
       <column name="AD_MODULE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
-        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0']]></onCreateDefault>
+        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0' AND TYPE='M']]></onCreateDefault>
       </column>
       <column name="ISACTIVE" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
         <default><![CDATA[Y]]></default>
--- a/src-db/database/model/tables/AD_PROCESS.xml	Mon Dec 15 09:55:05 2008 +0000
+++ b/src-db/database/model/tables/AD_PROCESS.xml	Mon Dec 15 10:20:07 2008 +0000
@@ -99,7 +99,7 @@
       </column>
       <column name="AD_MODULE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default><![CDATA[0]]></default>
-        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0']]></onCreateDefault>
+        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0' AND TYPE='M']]></onCreateDefault>
       </column>
       <column name="UIPATTERN" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
         <default><![CDATA[S]]></default>
--- a/src-db/database/model/tables/AD_REFERENCE.xml	Mon Dec 15 09:55:05 2008 +0000
+++ b/src-db/database/model/tables/AD_REFERENCE.xml	Mon Dec 15 10:20:07 2008 +0000
@@ -55,7 +55,7 @@
       </column>
       <column name="AD_MODULE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default><![CDATA[0]]></default>
-        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0']]></onCreateDefault>
+        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0' AND TYPE='M']]></onCreateDefault>
       </column>
       <foreign-key foreignTable="AD_MODULE" name="ADMODULE_ADREFERENCE">
         <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
--- a/src-db/database/model/tables/AD_REF_DATA_LOADED.xml	Mon Dec 15 09:55:05 2008 +0000
+++ b/src-db/database/model/tables/AD_REF_DATA_LOADED.xml	Mon Dec 15 10:20:07 2008 +0000
@@ -35,7 +35,7 @@
       </column>
       <column name="AD_MODULE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
-        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0']]></onCreateDefault>
+        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0' AND TYPE='M']]></onCreateDefault>
       </column>
       <column name="GENERIC_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
--- a/src-db/database/model/tables/AD_TAB.xml	Mon Dec 15 09:55:05 2008 +0000
+++ b/src-db/database/model/tables/AD_TAB.xml	Mon Dec 15 10:20:07 2008 +0000
@@ -139,7 +139,7 @@
       </column>
       <column name="AD_MODULE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default><![CDATA[0]]></default>
-        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0']]></onCreateDefault>
+        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0' AND TYPE='M']]></onCreateDefault>
       </column>
       <foreign-key foreignTable="AD_COLUMN" name="AD_COLUMN_AD_TAB">
         <reference local="AD_COLUMN_ID" foreign="AD_COLUMN_ID"/>
--- a/src-db/database/model/tables/AD_TEXTINTERFACES.xml	Mon Dec 15 09:55:05 2008 +0000
+++ b/src-db/database/model/tables/AD_TEXTINTERFACES.xml	Mon Dec 15 10:20:07 2008 +0000
@@ -47,7 +47,7 @@
       </column>
       <column name="AD_MODULE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default><![CDATA[0]]></default>
-        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0']]></onCreateDefault>
+        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0' AND TYPE='M']]></onCreateDefault>
       </column>
       <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADTEXTINTERFACES">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
--- a/src-db/database/model/tables/AD_VAL_RULE.xml	Mon Dec 15 09:55:05 2008 +0000
+++ b/src-db/database/model/tables/AD_VAL_RULE.xml	Mon Dec 15 10:20:07 2008 +0000
@@ -51,7 +51,7 @@
       </column>
       <column name="AD_MODULE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default><![CDATA[0]]></default>
-        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0']]></onCreateDefault>
+        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0' AND TYPE='M']]></onCreateDefault>
       </column>
       <foreign-key foreignTable="AD_MODULE" name="ADMODULE_ADVALRULE">
         <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
--- a/src-db/database/model/tables/AD_WINDOW.xml	Mon Dec 15 09:55:05 2008 +0000
+++ b/src-db/database/model/tables/AD_WINDOW.xml	Mon Dec 15 10:20:07 2008 +0000
@@ -67,7 +67,7 @@
       </column>
       <column name="AD_MODULE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default><![CDATA[0]]></default>
-        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0']]></onCreateDefault>
+        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0' AND TYPE='M']]></onCreateDefault>
       </column>
       <foreign-key foreignTable="AD_IMAGE" name="ADIMAGE_ADWINDOW">
         <reference local="AD_IMAGE_ID" foreign="AD_IMAGE_ID"/>
--- a/src-db/database/model/tables/AD_WORKFLOW.xml	Mon Dec 15 09:55:05 2008 +0000
+++ b/src-db/database/model/tables/AD_WORKFLOW.xml	Mon Dec 15 10:20:07 2008 +0000
@@ -55,7 +55,7 @@
       </column>
       <column name="AD_MODULE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default><![CDATA[0]]></default>
-        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0']]></onCreateDefault>
+        <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0' AND TYPE='M']]></onCreateDefault>
       </column>
       <foreign-key foreignTable="AD_WF_NODE" name="ADWFNODE_ADWORKFLOW">
         <reference local="AD_WF_NODE_ID" foreign="AD_WF_NODE_ID"/>