[newupgrade] Merge with pi
authorAntonio Moreno <antonio.moreno@openbravo.com>
Fri, 04 Dec 2009 11:52:51 +0100
changeset 5624 9f8fa491a5ff
parent 5623 a5c0b5d5af92 (current diff)
parent 5589 54c682ef056e (diff)
child 5625 dba78cbb214c
[newupgrade] Merge with pi
build.xml
src-db/database/lib/dbsourcemanager.jar
src-db/database/model/tables/AD_SYSTEM_INFO.xml
src-db/database/sourcedata/AD_COLUMN.xml
src-db/database/sourcedata/AD_ELEMENT.xml
src-db/database/sourcedata/AD_FIELD.xml
src-db/database/sourcedata/AD_MESSAGE.xml
src-db/database/sourcedata/AD_MODEL_OBJECT.xml
src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml
src-db/database/sourcedata/AD_MODULE.xml
src-db/database/sourcedata/AD_TEXTINTERFACES.xml
src-wad/src/org/openbravo/wad/Wad.java
src-wad/src/org/openbravo/wad/validation/WADValidationResult.java
src-wad/src/org/openbravo/wad/validation/WADValidator.java
src-wad/src/org/openbravo/wad/validation/WADValidator_data.xsql
src/build.xml
src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java
--- a/.hgsigs	Fri Dec 04 11:41:15 2009 +0100
+++ b/.hgsigs	Fri Dec 04 11:52:51 2009 +0100
@@ -8,3 +8,4 @@
 9d3a0d3eb72d7b3e751413809fceaa8142b0484a 0 iEYEABECAAYFAkrKN+IACgkQz3UmZbtB87CZ7QCaAllz+OE3JigDDtIXvWpizebbN4UAn2lxlkyEZc/5tqvds2M56AkGJLfM
 0cfeba053b113059f5a2609f47d5a637d9972a07 0 iEYEABECAAYFAkrcmSAACgkQCX/oGf+2qkM5bwCeM1fKbo2g5jZd0lvxFT1KEdQfMRAAoK0H+S24IXT3H+mp1ZRI5Dd5dpLs
 9f91fb70ebff156b6650de4e255fe723f2262fd7 0 iEYEABECAAYFAkroDJIACgkQCX/oGf+2qkOYgACdFu7ttmyClvcEKNJb4hTStIEggmkAoNOEc7lBPEfPizXiCfeRDGBOF7OF
+e7c306101389e980c1a1fb9d1bfeb3e200efaa94 0 iEYEABECAAYFAksNhdEACgkQCX/oGf+2qkNCCgCfVvVHzYDUBoPwv3mHqE+dLpz88UsAnRrvpWvUmXozxdaMD0X0IV123bH0
--- a/.hgtags	Fri Dec 04 11:41:15 2009 +0100
+++ b/.hgtags	Fri Dec 04 11:52:51 2009 +0100
@@ -18,3 +18,4 @@
 0915b92ee31ccfa42e9b2ca98dc07f113c7e16b0 2.50MP6
 bb34a48d4b2b3efa6e655e7b58590c52ff177db5 2.50MP7
 6a836f38131f9c289b9f3a838b728711ddd277fb 2.50MP8
+003090f7d33a5d408405addea4c74ca8e1d9f186 2.50MP9
--- a/build.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/build.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -739,8 +739,17 @@
     <taskdef name="validateModules" classname="org.openbravo.service.system.SystemValidationTask">
       <classpath refid="project.class.path" />
     </taskdef>
+    
+    <taskdef name="WADValidation" classname="org.openbravo.wad.validation.WADValidatorTask">
+      <classpath refid="project.class.path" />
+    </taskdef>
+            
+    <echo message="Validating Module..." />
+    
+    <WADValidation propertiesFile="${base.config}/Openbravo.properties"
+                   modules="${module}"
+                   stoponerror="true"/>
 
-    <echo message="Validating Module..." />
     <validateModules moduleJavaPackage="${module}" failOnError="false" userId="0" adminMode="true" propertiesFile="${base.config}/Openbravo.properties" type="module" />
 
     <antcall target="obx.export.database" />
@@ -877,4 +886,8 @@
   <target name="load.logoimages">
     <ant dir="${base.src}" target="load.logoimages" inheritAll="true" inheritRefs="true" />
   </target>
+  
+  <target name="validate.wad">
+    <ant dir="${base.src}" target="wadvalidation" inheritAll="true" inheritRefs="true" />
+  </target>
 </project>
--- a/src-core/src/org/openbravo/data/Sqlc.java	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-core/src/org/openbravo/data/Sqlc.java	Fri Dec 04 11:52:51 2009 +0100
@@ -948,6 +948,9 @@
             posFinalAfter = 0;
             out2.append("    strSql = strSql + ((" + parameter.strName + "==null || "
                 + parameter.strName + ".equals(\"\"))?\"\":" + parameter.strName + ");\n");
+          } else {
+            log4j.error(sqlcName + "." + sql.sqlName + " position after = \"" + parameter.strAfter
+                + "\" for optional parameter " + parameter.strName + " not found in xsql file!");
           }
         }
       }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-db/database/model/functions/AD_GET_COMMONPARENTORG.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+  <database name="FUNCTION AD_GET_COMMONPARENTORG">
+    <function name="AD_GET_COMMONPARENTORG" type="VARCHAR">
+      <parameter name="p_ad_org1_id" type="VARCHAR" mode="in">
+        <default/>
+      </parameter>
+      <parameter name="p_ad_org2_id" type="VARCHAR" mode="in">
+        <default/>
+      </parameter>
+      <parameter name="p_ad_client_id" type="VARCHAR" mode="in">
+        <default/>
+      </parameter>
+      <body><![CDATA[/*************************************************************************
+* The contents of this file are subject to the Openbravo  Public  License
+* Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+* Version 1.1  with a permitted attribution clause; you may not  use this
+* file except in compliance with the License. You  may  obtain  a copy of
+* the License at http://www.openbravo.com/legal/license.html
+* Software distributed under the License  is  distributed  on  an "AS IS"
+* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+* License for the specific  language  governing  rights  and  limitations
+* under the License.
+* The Original Code is Openbravo ERP.
+* The Initial Developer of the Original Code is Openbravo SL
+* All portions are Copyright (C) 2009 Openbravo SL
+* All Rights Reserved.
+* Contributor(s):  ______________________________________.
+************************************************************************/
+/*************************************************************************
+* Returns common ancestor organization between two organizations. If the
+  common ancestor is not present between two organizations, it returns null.
+************************************************************************/
+  v_minLevel NUMBER:=0;
+  v_currLevel NUMBER;
+  v_parentOrg_Id VARCHAR2(32);
+  TYPE RECORD IS REF CURSOR;
+  Cur_Orgs RECORD;
+BEGIN
+
+FOR Cur_Orgs IN (
+  select * from ad_org where ad_isorgincluded(p_ad_org1_id, ad_org_id, p_ad_client_id)<>-1 AND ad_org_id<>'0'
+  INTERSECT
+  select * from ad_org where ad_isorgincluded(p_ad_org2_id, ad_org_id, p_ad_client_id)<>-1 AND ad_org_id<>'0')
+  LOOP
+    v_currLevel:=ad_isorgincluded(p_ad_org1_id, Cur_Orgs.ad_org_id, p_ad_client_id);
+    if(v_minLevel=0) then
+      v_minLevel:=v_currLevel;
+    end if;
+      
+    if(v_currLevel<=v_minLevel) then
+      v_minLevel:=v_currLevel;
+      v_parentOrg_Id:=Cur_Orgs.ad_org_id;
+    end if;
+  END LOOP;
+
+  RETURN v_parentorg_id;
+END AD_GET_COMMONPARENTORG
+]]></body>
+    </function>
+  </database>
--- a/src-db/database/model/functions/C_INVOICE_POST.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/functions/C_INVOICE_POST.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -1423,7 +1423,8 @@
             CurLines RECORD;
             p_DateInvoiced DATE;
             v_totalQtyInvoiced NUMBER;
-            v_NewPendingToInvoice NUMBER;
+            v_ODocumentNo C_ORDER.DocumentNo%TYPE;
+            v_NewPendingToInvoice NUMBER;            
             v_deliveredQty NUMBER;
             v_inOutStatus varchar2(60) ;
           BEGIN
@@ -1436,14 +1437,16 @@
             LOOP
               IF(CurLines.C_OrderLine_ID IS NOT NULL) THEN
                 --Check that qty pending to invoice is higher or equal to the qty being invoiced
-                SELECT qtyordered - qtyinvoiced - CurLines.QtyInvoiced
-                  INTO v_NewPendingToInvoice
-                FROM c_orderline
-                WHERE c_orderline.c_orderline_id = CurLines.c_orderline_id;
+                SELECT o.documentno, ABS(ol.qtyordered) - ABS(ol.qtyinvoiced + CurLines.QtyInvoiced)
+                  INTO v_ODocumentNo, v_NewPendingToInvoice
+                FROM c_order o, c_orderline ol
+                WHERE o.c_order_id = ol.c_order_id
+                AND ol.c_orderline_id = CurLines.c_orderline_id;
                 IF (v_NewPendingToInvoice <0 ) THEN
                   v_Message := '@NotPossibleCompleteInvoice@' || ' ' || v_DocumentNo;
-                  v_Message := v_Message || ' ' || '@line@' || CurLines.line || '. ';
-                  v_Message := v_Message || '@QtyInvoicedHigherOrdered@';
+                  v_Message := v_Message || ' ' || '@line@' || ' ' || CurLines.line || '. ';
+                  v_Message := v_Message || '@OrderDocumentno@' || ' ' || v_ODocumentNo;
+                  v_Message := v_Message || ': ' || '@QtyInvoicedHigherOrdered@' || '.';                  
                   RAISE_APPLICATION_ERROR(-20000, v_Message);
                 END IF;
                 UPDATE C_ORDERLINE
--- a/src-db/database/model/functions/C_PERIOD_PROCESS.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/functions/C_PERIOD_PROCESS.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -47,6 +47,7 @@
   p_DocBaseType C_PeriodControl_Log.DocBaseType%TYPE;
   p_PeriodAction C_PeriodControl_Log.PeriodAction%TYPE;
   p_Processing C_PeriodControl_Log.Processing%TYPE;
+  v_AD_Client_ID C_PeriodControl_Log.AD_Client_ID%TYPE;
   
 BEGIN
     --  Update AD_PInstance
@@ -61,8 +62,8 @@
     FROM AD_PInstance
     WHERE AD_PInstance_ID=p_PInstance_ID;
     
-    SELECT AD_Org_ID, ISRecursive, C_Year_ID, PeriodNO, DocBaseType, PeriodAction, Processing
-    INTO p_Organization, p_IsRecursive, p_Year, p_PeriodNO, p_DocBaseType, p_PeriodAction, p_Processing
+    SELECT AD_Client_ID, AD_Org_ID, ISRecursive, C_Year_ID, PeriodNO, DocBaseType, PeriodAction, Processing
+    INTO v_AD_Client_ID, p_Organization, p_IsRecursive, p_Year, p_PeriodNO, p_DocBaseType, p_PeriodAction, p_Processing
     FROM C_PeriodControl_Log
     WHERE C_PeriodControl_Log_ID=v_Record_ID_Log;
       
@@ -116,7 +117,8 @@
         -- Action: Close if not permanently closed
       ELSIF(p_PeriodAction='C') THEN
         SELECT COUNT(DISTINCT C_YEAR.YEAR) INTO v_Count FROM C_PERIOD, C_PERIODCONTROL, C_YEAR WHERE 
-          C_PERIODCONTROL.C_PERIOD_ID=C_PERIOD.C_PERIOD_ID AND C_PERIOD.C_YEAR_ID=C_YEAR.C_YEAR_ID AND C_PERIODCONTROL.PERIODSTATUS='O' AND C_YEAR.YEAR<p_Year;                  
+          C_PERIODCONTROL.C_PERIOD_ID=C_PERIOD.C_PERIOD_ID AND C_PERIOD.C_YEAR_ID=C_YEAR.C_YEAR_ID AND C_PERIODCONTROL.PERIODSTATUS='O' AND C_YEAR.YEAR<p_Year
+          AND C_PERIODCONTROL.AD_CLIENT_ID = v_AD_Client_ID;                  
         IF (v_Count>=1) THEN           
           RAISE_APPLICATION_ERROR(-20000, '@YearNotClose@');
         END IF;
--- a/src-db/database/model/functions/M_INOUT_POST.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/functions/M_INOUT_POST.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -87,6 +87,7 @@
     v_Line VARCHAR2(10) ;
     v_OrderID_old VARCHAR2(32);
     FINISH_PROCESS BOOLEAN:=false;
+    v_Aux NUMBER;
   BEGIN
     IF(p_PInstance_ID IS NOT NULL) THEN
       --  Update AD_PInstance
@@ -258,6 +259,12 @@
         IF(Cur_InOut.Processed='N' AND Cur_InOut.DocStatus='DR' AND Cur_InOut.DocAction='CO') THEN
           -- For all active shipment lines
           v_ResultStr:='HeaderLoop-1';
+          SELECT COUNT(*) INTO v_Aux
+			FROM M_InOutLine
+			WHERE M_InOut_ID = v_Record_ID;
+		  IF v_Aux=0 THEN
+			RAISE_APPLICATION_ERROR(-20000, '@ReceiptWithoutLines@');
+		  END IF;
           FOR Cur_InOutLine IN
             (SELECT *
             FROM M_INOUTLINE
@@ -505,7 +512,7 @@
             and c_order.invoicerule in ('D', 'O', 'S')
             and c_invoice.processed='Y'
           group by m_inoutline.m_inoutline_id, m_inoutline.line
-          having sum(c_invoiceline.qtyinvoiced) > 0
+          having sum(c_invoiceline.qtyinvoiced) <> 0
           ) a;
           IF (v_count > 0 ) THEN
             v_Message := '@InoutDocumentno@' || ': ' || Cur_InOut.DocumentNo || ' ' || '@line@' || ': ' || v_line || '. ';
--- a/src-db/database/model/postscript-Oracle.sql	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/postscript-Oracle.sql	Fri Dec 04 11:52:51 2009 +0100
@@ -806,6 +806,14 @@
  return 'ORACLE';
 END AD_GET_RDBMS;
 /-- END
+ 
+
+--Regenerate mappings and classnames for tabs in modules (issue #11431)
+update ad_tab set name = 'M'||name where ad_module_id != '0'
+/-- END
+ 
+update ad_tab set name = substr(name,2) where ad_module_id != '0'
+/-- END
 
 CALL DBA_RECOMPILE(NULL)
 /-- END
--- a/src-db/database/model/postscript-PostgreSql.sql	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/postscript-PostgreSql.sql	Fri Dec 04 11:52:51 2009 +0100
@@ -558,3 +558,10 @@
 VOLATILE STRICT LANGUAGE C;
 /-- END
 
+--Regenerate mappings and classnames for tabs in modules (issue #11431)
+update ad_tab set name = 'M'||name where ad_module_id != '0'
+/-- END
+ 
+update ad_tab set name = substr(name,2) where ad_module_id != '0'
+/-- END
+
--- a/src-db/database/model/tables/AD_ACCOUNTINGRPT_ELEMENT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_ACCOUNTINGRPT_ELEMENT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="TABLE AD_ACCOUNTINGRPT_ELEMENT">
-    <table name="AD_ACCOUNTINGRPT_ELEMENT" primaryKey="PK_AD_ACCOUNTINGRPT_ELEMENT">
+    <table name="AD_ACCOUNTINGRPT_ELEMENT" primaryKey="AD_ACCOUNTINGRPT_ELEMENT_KEY">
       <column name="AD_ACCOUNTINGRPT_ELEMENT_ID" primaryKey="true" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
         <onCreateDefault/>
@@ -77,17 +77,17 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="C_ELEMENTVALUE" name="ADACCOUNTRPT_FK_ACCOUNT">
+      <foreign-key foreignTable="C_ELEMENTVALUE" name="AD_ACCOUNTINGRPT_ELEMENT_ACCOU">
         <reference local="ACCOUNT_ID" foreign="C_ELEMENTVALUE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ACCTSCHEMA" name="ADACCOUNTRPT_FK_ACCTSCHEMA">
-        <reference local="C_ACCTSCHEMA_ID" foreign="C_ACCTSCHEMA_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADACCOUNTRPT_FK_CLIENT">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_ACCOUNTINGRPT_ELEMENT_AD_CL">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADACCOUNTRPT_FK_ORG">
+      <foreign-key foreignTable="AD_ORG" name="AD_ACCOUNTINGRPT_ELEMENT_AD_OR">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="C_ACCTSCHEMA" name="AD_ACCOUNTINGRPT_ELEMENT_C_ACC">
+        <reference local="C_ACCTSCHEMA_ID" foreign="C_ACCTSCHEMA_ID"/>
+      </foreign-key>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_ACCTPROCESS.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_ACCTPROCESS.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -45,10 +45,10 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADACCTPROCESS">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_ACCTPROCESS_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADACCTPROCESS">
+      <foreign-key foreignTable="AD_ORG" name="AD_ACCTPROCESS_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
       <check name="AD_ACCTPROCESS_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
--- a/src-db/database/model/tables/AD_ALERT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_ALERT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -69,22 +69,22 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_ALERTRULE" name="ADALERTRULE_ADALERT">
+      <foreign-key foreignTable="AD_ALERTRULE" name="AD_ALERT_AD_ALERTRULE">
         <reference local="AD_ALERTRULE_ID" foreign="AD_ALERTRULE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADALERT">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_ALERT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADALERT">
+      <foreign-key foreignTable="AD_ORG" name="AD_ALERT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ROLE" name="ADROLE_ADALERT">
+      <foreign-key foreignTable="AD_ROLE" name="AD_ALERT_AD_ROLE">
         <reference local="AD_ROLE_ID" foreign="AD_ROLE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_USER" name="ADUSER_ADALERT">
+      <foreign-key foreignTable="AD_USER" name="AD_ALERT_AD_USER">
         <reference local="AD_USER_ID" foreign="AD_USER_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="M_WAREHOUSE" name="MWAREHOUSE_ADALERT">
+      <foreign-key foreignTable="M_WAREHOUSE" name="AD_ALERT_M_WAREHOUSE">
         <reference local="M_WAREHOUSE_ID" foreign="M_WAREHOUSE_ID"/>
       </foreign-key>
     </table>
--- a/src-db/database/model/tables/AD_ALERTRECIPIENT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_ALERTRECIPIENT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,19 +49,19 @@
         <default><![CDATA[Y]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_ALERTRULE" name="ADALERTRULE_ADALERTRECIPIENT" onDelete="cascade">
+      <foreign-key foreignTable="AD_ALERTRULE" name="AD_ALERTRECIPIENT_AD_ALERTRULE" onDelete="cascade">
         <reference local="AD_ALERTRULE_ID" foreign="AD_ALERTRULE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADALERTRECIPIENT">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_ALERTRECIPIENT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADALERTRECIPIENT">
+      <foreign-key foreignTable="AD_ORG" name="AD_ALERTRECIPIENT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ROLE" name="ADROLE_ADALERTRECIPIENT">
+      <foreign-key foreignTable="AD_ROLE" name="AD_ALERTRECIPIENT_AD_ROLE">
         <reference local="AD_ROLE_ID" foreign="AD_ROLE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_USER" name="ADUSER_ADALERTRECIPIENT">
+      <foreign-key foreignTable="AD_USER" name="AD_ALERTRECIPIENT_AD_USER">
         <reference local="AD_USER_ID" foreign="AD_USER_ID"/>
       </foreign-key>
     </table>
--- a/src-db/database/model/tables/AD_ALERTRULE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_ALERTRULE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -53,13 +53,13 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADALERTRULE">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_ALERTRULE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADALERTRULE">
+      <foreign-key foreignTable="AD_ORG" name="AD_ALERTRULE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_TAB" name="ADTAB_ADALTERTRULE" onDelete="cascade">
+      <foreign-key foreignTable="AD_TAB" name="AD_ALERTRULE_AD_TAB" onDelete="cascade">
         <reference local="AD_TAB_ID" foreign="AD_TAB_ID"/>
       </foreign-key>
     </table>
--- a/src-db/database/model/tables/AD_ALERTRULE_TRL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_ALERTRULE_TRL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,19 +49,19 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_ALERTRULE" name="ADALERTRULE_ADALERTRULETRL" onDelete="cascade">
+      <foreign-key foreignTable="AD_ALERTRULE" name="AD_ALERTRULE_TRL_AD_ALERTRULE" onDelete="cascade">
         <reference local="AD_ALERTRULE_ID" foreign="AD_ALERTRULE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADALERRTRULETRL" onDelete="cascade">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_ALERTRULE_TRL_AD_CLIENT" onDelete="cascade">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_LANGUAGE" name="ADLANGUAGE_ADALERTRULETRL">
+      <foreign-key foreignTable="AD_LANGUAGE" name="AD_ALERTRULE_TRL_AD_LANGUAGE">
         <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADALERTRULETRL">
+      <foreign-key foreignTable="AD_ORG" name="AD_ALERTRULE_TRL_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <unique name="ADALERTRULETRL_ADALERTRULEI_UN">
+      <unique name="AD_ALERTRULE_TRL_ALERTRULE__UN">
         <unique-column name="AD_ALERTRULE_ID"/>
         <unique-column name="AD_LANGUAGE"/>
       </unique>
--- a/src-db/database/model/tables/AD_ATTACHMENT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_ATTACHMENT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -57,16 +57,16 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADATTACHMENT">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_ATTACHMENT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_DATATYPE" name="ADDATATYPE_ADATTACHMENT">
+      <foreign-key foreignTable="AD_DATATYPE" name="AD_ATTACHMENT_AD_DATATYPE">
         <reference local="AD_DATATYPE_ID" foreign="AD_DATATYPE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADATTACHMENT">
+      <foreign-key foreignTable="AD_ORG" name="AD_ATTACHMENT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_TABLE" name="ADTABLE_ADATTACHMENT" onDelete="cascade">
+      <foreign-key foreignTable="AD_TABLE" name="AD_ATTACHMENT_AD_TABLE" onDelete="cascade">
         <reference local="AD_TABLE_ID" foreign="AD_TABLE_ID"/>
       </foreign-key>
       <index name="AD_ATTACHMENT_RECORD" unique="false">
--- a/src-db/database/model/tables/AD_AUXILIARINPUT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_AUXILIARINPUT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,16 +49,16 @@
         <default><![CDATA[0]]></default>
         <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">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_AUXILIARINPUT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_MODULE" name="ADMODULE_ADAUXILIARINPUT">
+      <foreign-key foreignTable="AD_MODULE" name="AD_AUXILIARINPUT_AD_MODULE">
         <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADAUXILIARINPUT">
+      <foreign-key foreignTable="AD_ORG" name="AD_AUXILIARINPUT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_TAB" name="ADTAB_ADAUXILIARINPUT">
+      <foreign-key foreignTable="AD_TAB" name="AD_AUXILIARINPUT_AD_TAB">
         <reference local="AD_TAB_ID" foreign="AD_TAB_ID"/>
       </foreign-key>
     </table>
--- a/src-db/database/model/tables/AD_CALLOUT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_CALLOUT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -45,15 +45,15 @@
         <default><![CDATA[0]]></default>
         <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">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_CALLOUT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADCALLOUT_FK_ORG">
+      <foreign-key foreignTable="AD_MODULE" name="AD_CALLOUT_AD_MODULE">
+        <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="AD_CALLOUT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_MODULE" name="ADMODULE_ADCALLOUT">
-        <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
-      </foreign-key>
       <check name="AD_CALLOUT_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_CHANGELOG.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_CHANGELOG.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -57,19 +57,19 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADCHANGELOG">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_CHANGELOG_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_COLUMN" name="ADCOLUMN_ADCHANGELOG" onDelete="cascade">
+      <foreign-key foreignTable="AD_COLUMN" name="AD_CHANGELOG_AD_COLUMN" onDelete="cascade">
         <reference local="AD_COLUMN_ID" foreign="AD_COLUMN_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADCHANGELOG">
+      <foreign-key foreignTable="AD_ORG" name="AD_CHANGELOG_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_SESSION" name="ADSESSION_ADCHANGELOG">
+      <foreign-key foreignTable="AD_SESSION" name="AD_CHANGELOG_AD_SESSION">
         <reference local="AD_SESSION_ID" foreign="AD_SESSION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_TABLE" name="ADTABLE_ADCHANGELOG" onDelete="cascade">
+      <foreign-key foreignTable="AD_TABLE" name="AD_CHANGELOG_AD_TABLE" onDelete="cascade">
         <reference local="AD_TABLE_ID" foreign="AD_TABLE_ID"/>
       </foreign-key>
     </table>
--- a/src-db/database/model/tables/AD_CLIENT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_CLIENT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -77,16 +77,16 @@
         <default/>
         <onCreateDefault><![CDATA[CASE WHEN AD_CLIENT_ID = '0' THEN '102' ELSE (SELECT C_ACCTSCHEMA.C_CURRENCY_ID FROM C_ACCTSCHEMA, AD_CLIENTINFO WHERE AD_CLIENTINFO.C_ACCTSCHEMA1_ID = C_ACCTSCHEMA.C_ACCTSCHEMA_ID AND AD_CLIENT.AD_CLIENT_ID = AD_CLIENTINFO.AD_CLIENT_ID) END]]></onCreateDefault>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADCLIENT">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_CLIENT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_LANGUAGE" name="ADLANGUAGE_ADCLIENT">
+      <foreign-key foreignTable="AD_LANGUAGE" name="AD_CLIENT_AD_LANGUAGE">
         <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADCLIENT">
+      <foreign-key foreignTable="AD_ORG" name="AD_CLIENT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_CURRENCY" name="CCURRENCY_ADCLIENT">
+      <foreign-key foreignTable="C_CURRENCY" name="AD_CLIENT_C_CURRENCY">
         <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
       </foreign-key>
       <unique name="AD_CLIENT_NAME">
--- a/src-db/database/model/tables/AD_CLIENTINFO.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_CLIENTINFO.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -140,6 +140,42 @@
       <foreign-key foreignTable="AD_CLIENT" name="AD_CLIENT_CLIENTINFO">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="AD_CLIENTINFO_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_TREE" name="AD_CLIENTINFO_AD_TREE_BPARTNER">
+        <reference local="AD_TREE_BPARTNER_ID" foreign="AD_TREE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_TREE" name="AD_CLIENTINFO_AD_TREE_MENU">
+        <reference local="AD_TREE_MENU_ID" foreign="AD_TREE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_TREE" name="AD_CLIENTINFO_AD_TREE_ORG">
+        <reference local="AD_TREE_ORG_ID" foreign="AD_TREE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_TREE" name="AD_CLIENTINFO_AD_TREE_PRODUCT">
+        <reference local="AD_TREE_PRODUCT_ID" foreign="AD_TREE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_TREE" name="AD_CLIENTINFO_AD_TREE_PROJECT">
+        <reference local="AD_TREE_PROJECT_ID" foreign="AD_TREE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_TREE" name="AD_CLIENTINFO_AD_TREE_SALESREG">
+        <reference local="AD_TREE_SALESREGION_ID" foreign="AD_TREE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_ACCTSCHEMA" name="AD_CLIENTINFO_C_ACCTSCHEMA1">
+        <reference local="C_ACCTSCHEMA1_ID" foreign="C_ACCTSCHEMA_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_ACCTSCHEMA" name="AD_CLIENTINFO_C_ACCTSCHEMA2" onDelete="setnull">
+        <reference local="C_ACCTSCHEMA2_ID" foreign="C_ACCTSCHEMA_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_ACCTSCHEMA" name="AD_CLIENTINFO_C_ACCTSCHEMA3" onDelete="setnull">
+        <reference local="C_ACCTSCHEMA3_ID" foreign="C_ACCTSCHEMA_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_BPARTNER" name="AD_CLIENTINFO_C_BPARTNERCASHTR">
+        <reference local="C_BPARTNERCASHTRX_ID" foreign="C_BPARTNER_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_CALENDAR" name="AD_CLIENTINFO_C_CALENDAR">
+        <reference local="C_CALENDAR_ID" foreign="C_CALENDAR_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_IMAGE" name="AD_CLIENTINFO_IMAGEBIGCOMP">
         <reference local="YOUR_COMPANY_BIG_IMAGE" foreign="AD_IMAGE_ID"/>
       </foreign-key>
@@ -149,26 +185,11 @@
       <foreign-key foreignTable="AD_IMAGE" name="AD_CLIENTINFO_IMAGEMENUCOMP">
         <reference local="YOUR_COMPANY_MENU_IMAGE" foreign="AD_IMAGE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADCLIENTINFO">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      <foreign-key foreignTable="M_PRICELIST" name="AD_CLIENTINFO_M_PRICELIST">
+        <reference local="M_PRICELIST_ID" foreign="M_PRICELIST_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_TREE" name="ADTREEBPARTNER_ADCLIENTINFO">
-        <reference local="AD_TREE_BPARTNER_ID" foreign="AD_TREE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_TREE" name="ADTREEMENU_ADCLIENTINFO">
-        <reference local="AD_TREE_MENU_ID" foreign="AD_TREE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_TREE" name="ADTREEORG_ADCLIENTINFO">
-        <reference local="AD_TREE_ORG_ID" foreign="AD_TREE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_TREE" name="ADTREEPRODUCT_ADCLIENTINFO">
-        <reference local="AD_TREE_PRODUCT_ID" foreign="AD_TREE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_TREE" name="ADTREEPROJECT_ADCLIENTINFO">
-        <reference local="AD_TREE_PROJECT_ID" foreign="AD_TREE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_TREE" name="ADTREESALESREG_ADCLIENTINFO">
-        <reference local="AD_TREE_SALESREGION_ID" foreign="AD_TREE_ID"/>
+      <foreign-key foreignTable="M_PRODUCT" name="AD_CLIENTINFO_M_PRODUCTFREIGHT">
+        <reference local="M_PRODUCTFREIGHT_ID" foreign="M_PRODUCT_ID"/>
       </foreign-key>
       <foreign-key foreignTable="C_UOM" name="C_UOM_LENGTH_AD_CLIENTINFO">
         <reference local="C_UOM_LENGTH_ID" foreign="C_UOM_ID"/>
@@ -182,33 +203,12 @@
       <foreign-key foreignTable="C_UOM" name="C_UOM_WEIGHT_AD_CLIENTINFO">
         <reference local="C_UOM_WEIGHT_ID" foreign="C_UOM_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ACCTSCHEMA" name="CACCTSCHEMA1_ADCLIENTINFO">
-        <reference local="C_ACCTSCHEMA1_ID" foreign="C_ACCTSCHEMA_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_ACCTSCHEMA" name="CACCTSCHEMA2_ADCLIENTINFO" onDelete="setnull">
-        <reference local="C_ACCTSCHEMA2_ID" foreign="C_ACCTSCHEMA_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_ACCTSCHEMA" name="CACCTSCHEMA3_ADCLIENTINFO" onDelete="setnull">
-        <reference local="C_ACCTSCHEMA3_ID" foreign="C_ACCTSCHEMA_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_BPARTNER" name="CBPARTNER_ADCLIENTINFO">
-        <reference local="C_BPARTNERCASHTRX_ID" foreign="C_BPARTNER_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_CALENDAR" name="CCALENDAR_ADCLIENTINFO">
-        <reference local="C_CALENDAR_ID" foreign="C_CALENDAR_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="M_PRICELIST" name="MPRICELIST_ADCLIENTINFO">
-        <reference local="M_PRICELIST_ID" foreign="M_PRICELIST_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="M_PRODUCT" name="MPRODUCT_ADCLIENTINFO">
-        <reference local="M_PRODUCTFREIGHT_ID" foreign="M_PRODUCT_ID"/>
-      </foreign-key>
-      <check name="ADCLIENTINFO_ACCT2ACTIVE_CHECK"><![CDATA[ACCT2_ACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADCLIENTINFO_ACCT3ACTIVE_CHECK"><![CDATA[ACCT3_ACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADCLIENTINFO_ANEGATSTOCK_CHECK"><![CDATA[ALLOWNEGATIVESTOCK IN ('Y', 'N')]]></check>
-      <check name="ADCLIENTINFO_INOUTORG_CHECK"><![CDATA[CHECKINOUTORG IN ('Y', 'N')]]></check>
-      <check name="ADCLIENTINFO_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADCLIENTINFO_ISDISLNAMT_CHECK"><![CDATA[ISDISCOUNTLINEAMT IN ('Y', 'N')]]></check>
-      <check name="ADCLIENTINFO_ORDERORG_CHECK"><![CDATA[CHECKORDERORG IN ('Y', 'N')]]></check>
+      <check name="AD_CLIENTINFO_ACCT2_ACTIVE_CHK"><![CDATA[ACCT2_ACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_CLIENTINFO_ACCT3_ACTIVE_CHK"><![CDATA[ACCT3_ACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_CLIENTINFO_ALLOWNEGATIV_CHK"><![CDATA[ALLOWNEGATIVESTOCK IN ('Y', 'N')]]></check>
+      <check name="AD_CLIENTINFO_CHECKINOUTOR_CHK"><![CDATA[CHECKINOUTORG IN ('Y', 'N')]]></check>
+      <check name="AD_CLIENTINFO_CHECKORDEROR_CHK"><![CDATA[CHECKORDERORG IN ('Y', 'N')]]></check>
+      <check name="AD_CLIENTINFO_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_CLIENTINFO_ISDISCOUNTLI_CHK"><![CDATA[ISDISCOUNTLINEAMT IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_CLIENTMODULE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_CLIENTMODULE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -37,10 +37,10 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADCLIENTMODULE">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_CLIENTMODULE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_MODULE" name="ADMODULE_ADCLIENTMODULE" onDelete="cascade">
+      <foreign-key foreignTable="AD_MODULE" name="AD_CLIENTMODULE_AD_MODULE" onDelete="cascade">
         <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
       </foreign-key>
       <check name="AD_CLIENTMODULE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
--- a/src-db/database/model/tables/AD_COLUMN.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_COLUMN.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -173,6 +173,21 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <foreign-key foreignTable="AD_CALLOUT" name="AD_COLUMN_AD_CALLOUT">
+        <reference local="AD_CALLOUT_ID" foreign="AD_CALLOUT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="AD_COLUMN_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_MODULE" name="AD_COLUMN_AD_MODULE">
+        <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="AD_COLUMN_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_PROCESS" name="AD_COLUMN_AD_PROCESS" onDelete="setnull">
+        <reference local="AD_PROCESS_ID" foreign="AD_PROCESS_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_ELEMENT" name="AD_ELEMENT_AD_COLUMN">
         <reference local="AD_ELEMENT_ID" foreign="AD_ELEMENT_ID"/>
       </foreign-key>
@@ -188,21 +203,6 @@
       <foreign-key foreignTable="AD_VAL_RULE" name="AD_VALRULE_COLUMN">
         <reference local="AD_VAL_RULE_ID" foreign="AD_VAL_RULE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CALLOUT" name="ADCOLUMN_FK_CALLOUT">
-        <reference local="AD_CALLOUT_ID" foreign="AD_CALLOUT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_MODULE" name="ADMODULE_ADCOLUMN">
-        <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_PROCESS" name="ADPROCESS_ADCOLUMN" onDelete="setnull">
-        <reference local="AD_PROCESS_ID" foreign="AD_PROCESS_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="COLUMNCLIENT">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="COLUMNORG">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
       <index name="AD_COLUMN_TABLE" unique="false">
         <index-column name="AD_TABLE_ID"/>
       </index>
@@ -214,15 +214,15 @@
         <unique-column name="AD_TABLE_ID"/>
         <unique-column name="NAME"/>
       </unique>
-      <check name="ADCOLUMN_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADCOLUMN_ISDESENCRYPT_CHECK"><![CDATA[ISDESENCRYPTABLE IN ('Y', 'N')]]></check>
-      <check name="ADCOLUMN_ISENCRYPTED_CHECK"><![CDATA[ISENCRYPTED IN ('Y', 'N')]]></check>
-      <check name="ADCOLUMN_ISIDENTIFIER_CHECK"><![CDATA[ISIDENTIFIER IN ('Y', 'N')]]></check>
-      <check name="ADCOLUMN_ISKEY_CHECK"><![CDATA[ISKEY IN ('Y', 'N')]]></check>
-      <check name="ADCOLUMN_ISMANDATORY_CHECK"><![CDATA[ISMANDATORY IN ('Y', 'N')]]></check>
-      <check name="ADCOLUMN_ISPARENT_CHECK"><![CDATA[ISPARENT IN ('Y', 'N')]]></check>
-      <check name="ADCOLUMN_ISSELCOL_CHECK"><![CDATA[ISSELECTIONCOLUMN IN ('Y', 'N')]]></check>
-      <check name="ADCOLUMN_ISTRANSLATED_CHECK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
-      <check name="ADCOLUMN_ISUPDATEABLE_CHECK"><![CDATA[ISUPDATEABLE IN ('Y', 'N')]]></check>
+      <check name="AD_COLUMN_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_COLUMN_ISDESENCRYPTABLE_CHK"><![CDATA[ISDESENCRYPTABLE IN ('Y', 'N')]]></check>
+      <check name="AD_COLUMN_ISENCRYPTED_CHK"><![CDATA[ISENCRYPTED IN ('Y', 'N')]]></check>
+      <check name="AD_COLUMN_ISIDENTIFIER_CHK"><![CDATA[ISIDENTIFIER IN ('Y', 'N')]]></check>
+      <check name="AD_COLUMN_ISKEY_CHK"><![CDATA[ISKEY IN ('Y', 'N')]]></check>
+      <check name="AD_COLUMN_ISMANDATORY_CHK"><![CDATA[ISMANDATORY IN ('Y', 'N')]]></check>
+      <check name="AD_COLUMN_ISPARENT_CHK"><![CDATA[ISPARENT IN ('Y', 'N')]]></check>
+      <check name="AD_COLUMN_ISSELECTIONCOLUM_CHK"><![CDATA[ISSELECTIONCOLUMN IN ('Y', 'N')]]></check>
+      <check name="AD_COLUMN_ISTRANSLATED_CHK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
+      <check name="AD_COLUMN_ISUPDATEABLE_CHK"><![CDATA[ISUPDATEABLE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_COLUMN_ACCESS.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_COLUMN_ACCESS.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -53,22 +53,22 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADCOLUMNACCESS">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_COLUMN_ACCESS_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_COLUMN" name="ADCOLUMN_ADCOLUMNACCESS" onDelete="cascade">
+      <foreign-key foreignTable="AD_COLUMN" name="AD_COLUMN_ACCESS_AD_COLUMN" onDelete="cascade">
         <reference local="AD_COLUMN_ID" foreign="AD_COLUMN_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADCOLUMNACCESS">
+      <foreign-key foreignTable="AD_ORG" name="AD_COLUMN_ACCESS_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ROLE" name="ADROLE_ADCOLUMNACCESS">
+      <foreign-key foreignTable="AD_ROLE" name="AD_COLUMN_ACCESS_AD_ROLE">
         <reference local="AD_ROLE_ID" foreign="AD_ROLE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_TABLE" name="ADTABLE_ADCOLUMNACCESS" onDelete="cascade">
+      <foreign-key foreignTable="AD_TABLE" name="AD_COLUMN_ACCESS_AD_TABLE" onDelete="cascade">
         <reference local="AD_TABLE_ID" foreign="AD_TABLE_ID"/>
       </foreign-key>
-      <unique name="ADCOLUMNACCESS_ADROLEID_ADC_UN">
+      <unique name="AD_COLUMN_ACCESS_ROLE_COLUM_UN">
         <unique-column name="AD_ROLE_ID"/>
         <unique-column name="AD_COLUMN_ID"/>
       </unique>
--- a/src-db/database/model/tables/AD_CREATEFACT_TEMPLATE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_CREATEFACT_TEMPLATE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,13 +49,13 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADCREATEFACTTEMPLATE">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_CREATEFACT_TEMPLATE_AD_CLIE">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADCREATEFACTTEMPLATE">
+      <foreign-key foreignTable="AD_ORG" name="AD_CREATEFACT_TEMPLATE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_TABLE" name="ADTABLE_ADCREATEFACTTEMPLATE">
+      <foreign-key foreignTable="AD_TABLE" name="AD_CREATEFACT_TEMPLATE_AD_TABL">
         <reference local="AD_TABLE_ID" foreign="AD_TABLE_ID"/>
       </foreign-key>
       <check name="AD_CREAFACTTEMP_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
--- a/src-db/database/model/tables/AD_DATASET.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_DATASET.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -61,16 +61,16 @@
         <default><![CDATA[Y]]></default>
         <onCreateDefault><![CDATA['Y']]></onCreateDefault>
       </column>
+      <foreign-key foreignTable="AD_CLIENT" name="AD_DATASET_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_MODULE" name="AD_DATASET_AD_MODULE">
         <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="CLIENT_ADDATASET">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ORG_ADDATASET">
+      <foreign-key foreignTable="AD_ORG" name="AD_DATASET_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <check name="ADDATASET_EXPORTALLOWED_CHECK"><![CDATA[EXPORTALLOWED IN ('Y', 'N')]]></check>
-      <check name="ADDATASET_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_DATASET_EXPORTALLOWED_CHK"><![CDATA[EXPORTALLOWED IN ('Y', 'N')]]></check>
+      <check name="AD_DATASET_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_DATASET_COLUMN.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_DATASET_COLUMN.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,22 +49,22 @@
         <default><![CDATA[0]]></default>
         <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">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_DATASET_COLUMN_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_COLUMN" name="AD_DATASET_COLUMN_AD_COLUMN">
         <reference local="AD_COLUMN_ID" foreign="AD_COLUMN_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_DATASET_TABLE" name="ADDATASET_ADDSCOLUMN">
+      <foreign-key foreignTable="AD_DATASET_TABLE" name="AD_DATASET_COLUMN_AD_DATASET_T">
         <reference local="AD_DATASET_TABLE_ID" foreign="AD_DATASET_TABLE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_MODULE" name="ADMODULE_ADDSCOLUMN">
+      <foreign-key foreignTable="AD_MODULE" name="AD_DATASET_COLUMN_AD_MODULE">
         <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="CLIENT_ADDSCOLUMN">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ORG_ADDSCOLUMN">
+      <foreign-key foreignTable="AD_ORG" name="AD_DATASET_COLUMN_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <check name="ADDSCOLUMN_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADDSCOLUMN_ISEXCLUDED_CHECK"><![CDATA[ISEXCLUDED IN ('Y', 'N')]]></check>
+      <check name="AD_DATASET_COLUMN_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_DATASET_COLUMN_ISEXCLUD_CHK"><![CDATA[ISEXCLUDED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_DATASET_TABLE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_DATASET_TABLE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -61,23 +61,23 @@
         <default><![CDATA[0]]></default>
         <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">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_DATASET_TABLE_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_DATASET" name="AD_DATASET_TABLE_AD_DATASET">
         <reference local="AD_DATASET_ID" foreign="AD_DATASET_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_MODULE" name="ADMODULE_ADDSTABLE">
+      <foreign-key foreignTable="AD_MODULE" name="AD_DATASET_TABLE_AD_MODULE">
         <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_TABLE" name="ADTABLE_ADDSTABLE">
+      <foreign-key foreignTable="AD_ORG" name="AD_DATASET_TABLE_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_TABLE" name="AD_DATASET_TABLE_AD_TABLE">
         <reference local="AD_TABLE_ID" foreign="AD_TABLE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="CLIENT_ADDSTABLE">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ORG_ADDSTABLE">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
-      <check name="ADDSTABLE_ALLCOLUMNS_CHECK"><![CDATA[INCLUDEALLCOLUMNS IN ('Y', 'N')]]></check>
-      <check name="ADDSTABLE_BUSINESSOBJ_CHECK"><![CDATA[ISBUSINESSOBJECT IN ('Y', 'N')]]></check>
-      <check name="ADDSTABLE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_DATASET_TABLE_INCLUDEAL_CHK"><![CDATA[INCLUDEALLCOLUMNS IN ('Y', 'N')]]></check>
+      <check name="AD_DATASET_TABLE_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_DATASET_TABLE_ISBUSINES_CHK"><![CDATA[ISBUSINESSOBJECT IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_DATATYPE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_DATATYPE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -41,10 +41,10 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADDATATYPE">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_DATATYPE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADDATATYPE">
+      <foreign-key foreignTable="AD_ORG" name="AD_DATATYPE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
     </table>
--- a/src-db/database/model/tables/AD_DIMENSION.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_DIMENSION.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -61,13 +61,13 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADDIMENSION">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_DIMENSION_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADDIMENSION">
+      <foreign-key foreignTable="AD_ORG" name="AD_DIMENSION_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_PROCESS" name="ADPROCESS_ADDIMENSION" onDelete="cascade">
+      <foreign-key foreignTable="AD_PROCESS" name="AD_DIMENSION_AD_PROCESS" onDelete="cascade">
         <reference local="AD_PROCESS_ID" foreign="AD_PROCESS_ID"/>
       </foreign-key>
     </table>
--- a/src-db/database/model/tables/AD_ELEMENT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_ELEMENT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -73,13 +73,13 @@
         <default><![CDATA[0]]></default>
         <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">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_ELEMENT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_MODULE" name="ADMODULE_ADLEMENT">
+      <foreign-key foreignTable="AD_MODULE" name="AD_ELEMENT_AD_MODULE">
         <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADELEMENT">
+      <foreign-key foreignTable="AD_ORG" name="AD_ELEMENT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
       <index name="AD_ELEMENT_CLIENTORG" unique="false">
--- a/src-db/database/model/tables/AD_ELEMENT_TRL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_ELEMENT_TRL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -77,23 +77,23 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
+      <foreign-key foreignTable="AD_CLIENT" name="AD_ELEMENT_TRL_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ELEMENT" name="AD_ELEMENT_TRL_AD_ELEMENT" onDelete="cascade">
+        <reference local="AD_ELEMENT_ID" foreign="AD_ELEMENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="AD_ELEMENT_TRL_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_LANGUAGE" name="AD_LANGUAGE_AD_ELEMENT_TRL">
         <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADELEMENTTRL">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ELEMENT" name="ADELEMENT_ADELEMENTTRL" onDelete="cascade">
-        <reference local="AD_ELEMENT_ID" foreign="AD_ELEMENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADELEMENTTRL">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
-      <unique name="ADELEMENTTRL_ADELEMENTID_AD_UN">
+      <unique name="AD_ELEMENT_TRL_ELEMENT_LANG_UN">
         <unique-column name="AD_ELEMENT_ID"/>
         <unique-column name="AD_LANGUAGE"/>
       </unique>
-      <check name="ADELEMENTTRL_IS_ANSLATED_CHECK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
-      <check name="ADELEMENTTRL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_ELEMENT_TRL_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_ELEMENT_TRL_ISTRANSLATE_CHK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_EXCEPTIONS.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_EXCEPTIONS.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,19 +49,19 @@
         <default><![CDATA[0]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADEXCEPTIONS">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_EXCEPTIONS_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_MODULE" name="ADMODULE_ADEXCEPTIONS">
+      <foreign-key foreignTable="AD_MODULE" name="AD_EXCEPTIONS_AD_MODULE">
         <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADEXCEPTIONS">
+      <foreign-key foreignTable="AD_ORG" name="AD_EXCEPTIONS_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <index name="FKI_ADCLIENT_ADEXCEPTIONS" unique="false">
+      <index name="AD_EXCEPTIONS_CLIENT_IDX" unique="false">
         <index-column name="AD_CLIENT_ID"/>
       </index>
-      <index name="FKI_ADORG_ADEXCEPTIONS" unique="false">
+      <index name="AD_EXCEPTIONS_ORG_IDX" unique="false">
         <index-column name="AD_ORG_ID"/>
       </index>
     </table>
--- a/src-db/database/model/tables/AD_FIELD.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_FIELD.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -112,33 +112,33 @@
       <foreign-key foreignTable="AD_COLUMN" name="AD_COLUMN_FIELD">
         <reference local="AD_COLUMN_ID" foreign="AD_COLUMN_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="AD_FIELD_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_FIELDGROUP" name="AD_FIELD_AD_FIELDGROUP">
+        <reference local="AD_FIELDGROUP_ID" foreign="AD_FIELDGROUP_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_MODULE" name="AD_FIELD_AD_MODULE">
+        <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="AD_FIELD_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_TAB" name="AD_TAB_FIELD" onDelete="cascade">
         <reference local="AD_TAB_ID" foreign="AD_TAB_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_FIELDGROUP" name="ADFIELDGROUP_ADFIELD">
-        <reference local="AD_FIELDGROUP_ID" foreign="AD_FIELDGROUP_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_MODULE" name="ADMODULE_ADFIELD">
-        <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="FIELDCLIENT">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="FIELDORG">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
       <index name="AD_FIELD_COLUMN" unique="false">
         <index-column name="AD_COLUMN_ID"/>
       </index>
       <index name="AD_FIELD_TAB" unique="false">
         <index-column name="AD_TAB_ID"/>
       </index>
-      <check name="ADFIELD_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADFIELD_ISCENMAINT_CHECK"><![CDATA[ISCENTRALLYMAINTAINED IN ('Y', 'N')]]></check>
-      <check name="ADFIELD_ISDISPLAYED_CHECK"><![CDATA[ISDISPLAYED IN ('Y', 'N')]]></check>
-      <check name="ADFIELD_ISENCRYPTED_CHECK"><![CDATA[ISENCRYPTED IN ('Y', 'N')]]></check>
-      <check name="ADFIELD_ISFIELDONLY_CHECK"><![CDATA[ISFIELDONLY IN ('Y', 'N')]]></check>
-      <check name="ADFIELD_ISREADONLY_CHECK"><![CDATA[ISREADONLY IN ('Y', 'N')]]></check>
-      <check name="ADFIELD_ISSAMELINE_CHECK"><![CDATA[ISSAMELINE IN ('Y', 'N')]]></check>
+      <check name="AD_FIELD_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_FIELD_ISCENTRALLYMAINTA_CHK"><![CDATA[ISCENTRALLYMAINTAINED IN ('Y', 'N')]]></check>
+      <check name="AD_FIELD_ISDISPLAYED_CHK"><![CDATA[ISDISPLAYED IN ('Y', 'N')]]></check>
+      <check name="AD_FIELD_ISENCRYPTED_CHK"><![CDATA[ISENCRYPTED IN ('Y', 'N')]]></check>
+      <check name="AD_FIELD_ISFIELDONLY_CHK"><![CDATA[ISFIELDONLY IN ('Y', 'N')]]></check>
+      <check name="AD_FIELD_ISREADONLY_CHK"><![CDATA[ISREADONLY IN ('Y', 'N')]]></check>
+      <check name="AD_FIELD_ISSAMELINE_CHK"><![CDATA[ISSAMELINE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_FIELDGROUP.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_FIELDGROUP.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -41,13 +41,13 @@
         <default><![CDATA[0]]></default>
         <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">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_FIELDGROUP_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_MODULE" name="ADMODULE_ADFIELDGROUP">
+      <foreign-key foreignTable="AD_MODULE" name="AD_FIELDGROUP_AD_MODULE">
         <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADFIELDGROUP">
+      <foreign-key foreignTable="AD_ORG" name="AD_FIELDGROUP_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
       <check name="AD_FIELDGROUP_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
--- a/src-db/database/model/tables/AD_FIELDGROUP_TRL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_FIELDGROUP_TRL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,23 +49,23 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADFIELDGROUPTRL">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_FIELDGROUP_TRL_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_FIELDGROUP" name="ADFIELDGROUP_TRL" onDelete="cascade">
+      <foreign-key foreignTable="AD_FIELDGROUP" name="AD_FIELDGROUP_TRL_AD_FIELDGROU" onDelete="cascade">
         <reference local="AD_FIELDGROUP_ID" foreign="AD_FIELDGROUP_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_LANGUAGE" name="ADLANGUAGE_ADFIELDGROUPTRL">
+      <foreign-key foreignTable="AD_LANGUAGE" name="AD_FIELDGROUP_TRL_AD_LANGUAGE">
         <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADFIELDGROUPTRL">
+      <foreign-key foreignTable="AD_ORG" name="AD_FIELDGROUP_TRL_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <unique name="ADFIELDGROUPTRL_ADFIELDGROU_UN">
+      <unique name="AD_FIELDGROUP_TRL_FIELDGROU_UN">
         <unique-column name="AD_FIELDGROUP_ID"/>
         <unique-column name="AD_LANGUAGE"/>
       </unique>
-      <check name="ADFIELDGRTRL_IS_ANSLATED_CHECK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
-      <check name="ADFIELDGRTRL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_FIELDGROUP_TRL_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_FIELDGROUP_TRL_ISTRANSL_CHK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_FIELD_TRL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_FIELD_TRL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -57,23 +57,23 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
+      <foreign-key foreignTable="AD_CLIENT" name="AD_FIELD_TRL_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="AD_FIELD_TRL_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_FIELD" name="AD_FIELDTRL" onDelete="cascade">
         <reference local="AD_FIELD_ID" foreign="AD_FIELD_ID"/>
       </foreign-key>
       <foreign-key foreignTable="AD_LANGUAGE" name="AD_LANGUAGE_FIELDTRL">
         <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADFIELDTRL">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADFIELDTRL">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
-      <unique name="ADFIELDTRL_ADFIELDID_ADLANG_UN">
+      <unique name="AD_FIELD_TRL_FIELD_LANGUAGE_UN">
         <unique-column name="AD_FIELD_ID"/>
         <unique-column name="AD_LANGUAGE"/>
       </unique>
-      <check name="ADFIELDTRL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADFIELDTRL_ISTRANSLATED_CHECK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
+      <check name="AD_FIELD_TRL_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_FIELD_TRL_ISTRANSLATED_CHK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_FORM.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_FORM.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -57,13 +57,13 @@
         <default><![CDATA[0]]></default>
         <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">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_FORM_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_MODULE" name="ADMODULE_ADFORM">
+      <foreign-key foreignTable="AD_MODULE" name="AD_FORM_AD_MODULE">
         <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADFORM">
+      <foreign-key foreignTable="AD_ORG" name="AD_FORM_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
       <check name="AD_FORM_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
--- a/src-db/database/model/tables/AD_FORM_ACCESS.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_FORM_ACCESS.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -45,23 +45,23 @@
         <default><![CDATA[Y]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADFORMACCESS">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_FORM_ACCESS_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_FORM" name="ADFORM_ADFORMACCESS" onDelete="cascade">
+      <foreign-key foreignTable="AD_FORM" name="AD_FORM_ACCESS_AD_FORM" onDelete="cascade">
         <reference local="AD_FORM_ID" foreign="AD_FORM_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADFORMACCESS">
+      <foreign-key foreignTable="AD_ORG" name="AD_FORM_ACCESS_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ROLE" name="ADROLE_ADFORMACCESS" onDelete="cascade">
+      <foreign-key foreignTable="AD_ROLE" name="AD_FORM_ACCESS_AD_ROLE" onDelete="cascade">
         <reference local="AD_ROLE_ID" foreign="AD_ROLE_ID"/>
       </foreign-key>
       <index name="AD_FORM_ACCESS_UN_KEY" unique="true">
         <index-column name="AD_ROLE_ID"/>
         <index-column name="AD_FORM_ID"/>
       </index>
-      <check name="ADFORMAC_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADFORMAC_ISREADWRITE_CHECK"><![CDATA[ISREADWRITE IN ('Y', 'N')]]></check>
+      <check name="AD_FORM_ACCESS_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_FORM_ACCESS_ISREADWRITE_CHK"><![CDATA[ISREADWRITE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_FORM_TRL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_FORM_TRL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -57,23 +57,23 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADFORMTRL">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_FORM_TRL_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_FORM" name="ADFORM_ADFORMTRL" onDelete="cascade">
+      <foreign-key foreignTable="AD_FORM" name="AD_FORM_TRL_AD_FORM" onDelete="cascade">
         <reference local="AD_FORM_ID" foreign="AD_FORM_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_LANGUAGE" name="ADLANGUAGE_ADFORMTRL">
+      <foreign-key foreignTable="AD_LANGUAGE" name="AD_FORM_TRL_AD_LANGUAGE">
         <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADFORMTRL">
+      <foreign-key foreignTable="AD_ORG" name="AD_FORM_TRL_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <unique name="ADFORMTRL_ADFORMID_ADLANGUA_UN">
+      <unique name="AD_FORM_TRL_FORM_LANGUAGE_UN">
         <unique-column name="AD_FORM_ID"/>
         <unique-column name="AD_LANGUAGE"/>
       </unique>
-      <check name="ADFORMTRL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADFORMTRL_ISTRANSLATED_CHECK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
+      <check name="AD_FORM_TRL_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_FORM_TRL_ISTRANSLATED_CHK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_IMAGE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_IMAGE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -45,10 +45,10 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADIMAGE">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_IMAGE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADIMAGE">
+      <foreign-key foreignTable="AD_ORG" name="AD_IMAGE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
       <check name="AD_IMAGE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
--- a/src-db/database/model/tables/AD_IMPFORMAT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_IMPFORMAT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -53,13 +53,13 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADIMPFORMAT">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_IMPFORMAT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADIMPFORMAT">
+      <foreign-key foreignTable="AD_ORG" name="AD_IMPFORMAT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_TABLE" name="ADTABLE_ADIMPFORMAT" onDelete="cascade">
+      <foreign-key foreignTable="AD_TABLE" name="AD_IMPFORMAT_AD_TABLE" onDelete="cascade">
         <reference local="AD_TABLE_ID" foreign="AD_TABLE_ID"/>
       </foreign-key>
       <unique name="AD_IMPFORMAT_NAME">
--- a/src-db/database/model/tables/AD_IMPFORMAT_ROW.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_IMPFORMAT_ROW.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -85,23 +85,23 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADIMPFORMATROW">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_IMPFORMAT_ROW_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_COLUMN" name="ADCOLUMN_ADIMPFORMATROW" onDelete="cascade">
+      <foreign-key foreignTable="AD_COLUMN" name="AD_IMPFORMAT_ROW_AD_COLUMN" onDelete="cascade">
         <reference local="AD_COLUMN_ID" foreign="AD_COLUMN_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_IMPFORMAT" name="ADIMPFORMAT_ADIMPFORMATROW" onDelete="cascade">
+      <foreign-key foreignTable="AD_IMPFORMAT" name="AD_IMPFORMAT_ROW_AD_IMPFORMAT" onDelete="cascade">
         <reference local="AD_IMPFORMAT_ID" foreign="AD_IMPFORMAT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADIMPFORMATROW">
+      <foreign-key foreignTable="AD_ORG" name="AD_IMPFORMAT_ROW_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
       <unique name="AD_IMPFORMAT_ROW_COLUMN">
         <unique-column name="AD_IMPFORMAT_ID"/>
         <unique-column name="AD_COLUMN_ID"/>
       </unique>
-      <check name="ADIMPFORMATROW_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADIMPFORMROW_DIV100_CHECK"><![CDATA[DIVIDEBY100 IN ('Y', 'N')]]></check>
+      <check name="AD_IMPFORMAT_ROW_DIVIDEBY1_CHK"><![CDATA[DIVIDEBY100 IN ('Y', 'N')]]></check>
+      <check name="AD_IMPFORMAT_ROW_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_LANGUAGE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_LANGUAGE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -73,17 +73,17 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault><![CDATA['N']]></onCreateDefault>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="LANGUAGECLIENT">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_LANGUAGE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="LANGUAGEORG">
+      <foreign-key foreignTable="AD_ORG" name="AD_LANGUAGE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
       <unique name="AD_LANGUAGE_UN">
         <unique-column name="AD_LANGUAGE"/>
       </unique>
-      <check name="ADLANGUAGE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADLANGUAGE_ISBASELANG_CHECK"><![CDATA[ISBASELANGUAGE IN ('Y', 'N')]]></check>
-      <check name="ADLANGUAGE_ISSYSANG_CHECK"><![CDATA[ISSYSTEMLANGUAGE IN ('Y', 'N')]]></check>
+      <check name="AD_LANGUAGE_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_LANGUAGE_ISBASELANGUAGE_CHK"><![CDATA[ISBASELANGUAGE IN ('Y', 'N')]]></check>
+      <check name="AD_LANGUAGE_ISSYSTEMLANGUA_CHK"><![CDATA[ISSYSTEMLANGUAGE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_MENU.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_MENU.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -77,30 +77,30 @@
         <default><![CDATA[0]]></default>
         <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="AD_MENU_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_FORM" name="AD_MENU_AD_FORM">
+        <reference local="AD_FORM_ID" foreign="AD_FORM_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_MODULE" name="AD_MENU_AD_MODULE">
+        <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_PROCESS" name="AD_MENU_AD_PROCESS">
+        <reference local="AD_PROCESS_ID" foreign="AD_PROCESS_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_TASK" name="AD_MENU_AD_TASK">
+        <reference local="AD_TASK_ID" foreign="AD_TASK_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_WINDOW" name="AD_MENU_AD_WINDOW">
+        <reference local="AD_WINDOW_ID" foreign="AD_WINDOW_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_WORKFLOW" name="AD_MENU_AD_WORKFLOW">
+        <reference local="AD_WORKFLOW_ID" foreign="AD_WORKFLOW_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_ORG" name="AD_MENU_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADMENU">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_FORM" name="ADFORM_ADMENU">
-        <reference local="AD_FORM_ID" foreign="AD_FORM_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_MODULE" name="ADMODULE_ADMENU">
-        <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_PROCESS" name="ADPROCESS_ADMENU">
-        <reference local="AD_PROCESS_ID" foreign="AD_PROCESS_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_TASK" name="ADTASK_ADMENU">
-        <reference local="AD_TASK_ID" foreign="AD_TASK_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_WINDOW" name="ADWINDOW_ADMENU">
-        <reference local="AD_WINDOW_ID" foreign="AD_WINDOW_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_WORKFLOW" name="ADWORKFLOW_ADMENU">
-        <reference local="AD_WORKFLOW_ID" foreign="AD_WORKFLOW_ID"/>
-      </foreign-key>
-      <check name="ADMENU_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_MENU_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_MENU_TRL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_MENU_TRL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -56,20 +56,20 @@
       <foreign-key foreignTable="AD_LANGUAGE" name="AD_LANGUAGE_MENUTRL">
         <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="AD_MENU_TRL_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="AD_MENU_TRL_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_MENU" name="AD_MENUTRL" onDelete="cascade">
         <reference local="AD_MENU_ID" foreign="AD_MENU_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADMENUTRL">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADMENUTRL">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
-      <unique name="ADMENUTRL_ADMENUID_ADLANGUA_UN">
+      <unique name="AD_MENU_TRL_MENU_LANGUAGE_UN">
         <unique-column name="AD_MENU_ID"/>
         <unique-column name="AD_LANGUAGE"/>
       </unique>
-      <check name="ADMENUTRL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADMENUTRL_ISTRANSLATED_CHECK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
+      <check name="AD_MENU_TRL_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_MENU_TRL_ISTRANSLATED_CHK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_MESSAGE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_MESSAGE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -53,16 +53,16 @@
         <default><![CDATA[0]]></default>
         <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">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_MESSAGE_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_MODULE" name="AD_MESSAGE_AD_MODULE">
         <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="MESSAGECLIENT">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="MESSAGEORG">
+      <foreign-key foreignTable="AD_ORG" name="AD_MESSAGE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <unique name="MESSAGE_UN_VALUE">
+      <unique name="AD_MESSAGE_VALUE_UN">
         <unique-column name="VALUE"/>
       </unique>
       <check name="AD_MESSAGE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
--- a/src-db/database/model/tables/AD_MESSAGE_TRL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_MESSAGE_TRL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -56,20 +56,20 @@
       <foreign-key foreignTable="AD_LANGUAGE" name="AD_LANGUAGE_MESSAGETRL">
         <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="AD_MESSAGE_TRL_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="AD_MESSAGE_TRL_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_MESSAGE" name="AD_MESSAGETRL" onDelete="cascade">
         <reference local="AD_MESSAGE_ID" foreign="AD_MESSAGE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADMESSAGETRL">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADMESSAGETRL">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
-      <unique name="ADMESSAGETRL_ADMESSAGEID_AD_UN">
+      <unique name="AD_MESSAGE_TRL_MESSAGE_LANG_UN">
         <unique-column name="AD_MESSAGE_ID"/>
         <unique-column name="AD_LANGUAGE"/>
       </unique>
-      <check name="ADMESSAGE_TRL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADMESSAGE_TRL_ISTRANSD_CHECK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
+      <check name="AD_MESSAGE_TRL_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_MESSAGE_TRL_ISTRANSLATE_CHK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_MODEL_OBJECT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_MODEL_OBJECT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -93,40 +93,40 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="MODELOBJ_FK_CLIENT">
+      <foreign-key foreignTable="AD_CALLOUT" name="AD_MODEL_OBJECT_AD_CALLOUT">
+        <reference local="AD_CALLOUT_ID" foreign="AD_CALLOUT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="AD_MODEL_OBJECT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_MODULE" name="MODELOBJ_FK_MODULE">
+      <foreign-key foreignTable="AD_FORM" name="AD_MODEL_OBJECT_AD_FORM">
+        <reference local="AD_FORM_ID" foreign="AD_FORM_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_MODULE" name="AD_MODEL_OBJECT_AD_MODULE">
         <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="MODELOBJ_FK_ORG">
+      <foreign-key foreignTable="AD_ORG" name="AD_MODEL_OBJECT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CALLOUT" name="MODELOBJECT_FK_CALLOUT">
-        <reference local="AD_CALLOUT_ID" foreign="AD_CALLOUT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_FORM" name="MODELOBJECT_FK_FORM">
-        <reference local="AD_FORM_ID" foreign="AD_FORM_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_PROCESS" name="MODELOBJECT_FK_PROCESS">
+      <foreign-key foreignTable="AD_PROCESS" name="AD_MODEL_OBJECT_AD_PROCESS">
         <reference local="AD_PROCESS_ID" foreign="AD_PROCESS_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_REFERENCE" name="MODELOBJECT_FK_REFERENCE">
+      <foreign-key foreignTable="AD_REFERENCE" name="AD_MODEL_OBJECT_AD_REFERENCE">
         <reference local="AD_REFERENCE_ID" foreign="AD_REFERENCE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_TAB" name="MODELOBJECT_FK_TAB">
+      <foreign-key foreignTable="AD_TAB" name="AD_MODEL_OBJECT_AD_TAB">
         <reference local="AD_TAB_ID" foreign="AD_TAB_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_TASK" name="MODELOBJECT_FK_TASK">
+      <foreign-key foreignTable="AD_TASK" name="AD_MODEL_OBJECT_AD_TASK">
         <reference local="AD_TASK_ID" foreign="AD_TASK_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_WORKFLOW" name="MODELOBJECT_FK_WORKFLOW">
+      <foreign-key foreignTable="AD_WORKFLOW" name="AD_MODEL_OBJECT_AD_WORKFLOW">
         <reference local="AD_WORKFLOW_ID" foreign="AD_WORKFLOW_ID"/>
       </foreign-key>
       <unique name="AD_MODEL_OBJECT_CLASSNAME">
         <unique-column name="CLASSNAME"/>
       </unique>
-      <check name="ADMODELOBJECT_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADMODELOBJECT_ISDEFAULT_CHECK"><![CDATA[ISDEFAULT IN ('Y', 'N')]]></check>
+      <check name="AD_MODEL_OBJECT_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_MODEL_OBJECT_ISDEFAULT_CHK"><![CDATA[ISDEFAULT IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_MODEL_OBJECT_MAPPING.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_MODEL_OBJECT_MAPPING.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -45,16 +45,16 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="MODELOBJMAP_FK_CLIENT">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_MODEL_OBJECT_MAPPING_AD_CLI">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_MODEL_OBJECT" name="MODELOBJMAP_FK_MODELOBJ">
+      <foreign-key foreignTable="AD_MODEL_OBJECT" name="AD_MODEL_OBJECT_MAPPING_AD_MOD">
         <reference local="AD_MODEL_OBJECT_ID" foreign="AD_MODEL_OBJECT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="MODELOBJMAP_FK_ORG">
+      <foreign-key foreignTable="AD_ORG" name="AD_MODEL_OBJECT_MAPPING_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <check name="ADMODELOBJECTMA_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADMODELOBJECTMA_NG_ISDEF_CHECK"><![CDATA[ISDEFAULT IN ('Y', 'N')]]></check>
+      <check name="AD_MODEL_OBJECT_MAPPING_IS_CH1"><![CDATA[ISDEFAULT IN ('Y', 'N')]]></check>
+      <check name="AD_MODEL_OBJECT_MAPPING_IS_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_MODEL_OBJECT_PARA.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_MODEL_OBJECT_PARA.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="TABLE AD_MODEL_OBJECT_PARA">
-    <table name="AD_MODEL_OBJECT_PARA" primaryKey="MODELOBJPARA_KEY">
+    <table name="AD_MODEL_OBJECT_PARA" primaryKey="AD_MODEL_OBJECT_PARA_KEY">
       <column name="AD_MODEL_OBJECT_PARA_ID" primaryKey="true" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
         <onCreateDefault/>
@@ -49,15 +49,15 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_MODELOBJP">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_MODEL_OBJECT_PARA_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_MODELOBJP">
+      <foreign-key foreignTable="AD_MODEL_OBJECT" name="AD_MODEL_OBJECT_PARA_AD_MODEL_">
+        <reference local="AD_MODEL_OBJECT_ID" foreign="AD_MODEL_OBJECT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="AD_MODEL_OBJECT_PARA_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_MODEL_OBJECT" name="MODEL_MODELOBJP">
-        <reference local="AD_MODEL_OBJECT_ID" foreign="AD_MODEL_OBJECT_ID"/>
-      </foreign-key>
       <check name="AD_MOD_OBJ_PARA_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_MODULE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_MODULE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -141,21 +141,21 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault><![CDATA['N']]></onCreateDefault>
       </column>
-      <foreign-key foreignTable="AD_ORG" name="ADMODULE_AD_ORG">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADMODULE_ADCLIENT">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_MODULE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_LANGUAGE" name="ADMODULE_ADLANGUAGE">
+      <foreign-key foreignTable="AD_LANGUAGE" name="AD_MODULE_AD_LANGUAGE">
         <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="AD_MODULE_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
       <check name="AD_MODULE_INDEVELOPMENT_CHK"><![CDATA[ISINDEVELOPMENT IN ('Y', 'N')]]></check>
       <check name="AD_MODULE_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
       <check name="AD_MODULE_ISCOMMERCIAL_CHCK"><![CDATA[ISCOMMERCIAL IN ('Y', 'N')]]></check>
+      <check name="AD_MODULE_ISDEFAULT_CHK"><![CDATA[(ISDEFAULT = 'N') OR ((ISDEFAULT = 'Y') AND (ISINDEVELOPMENT = 'Y'))]]></check>
       <check name="AD_MODULE_ISREGISTERED_CHK"><![CDATA[ISREGISTERED IN ('Y', 'N')]]></check>
       <check name="AD_MODULE_ISTRANSLATEABLE_CHK"><![CDATA[ISTRANSLATIONREQUIRED IN ('Y', 'N')]]></check>
       <check name="AD_MODULE_TYPE_CHK"><![CDATA[TYPE IN ('M', 'P', 'T')]]></check>
-      <check name="ADMODULE_DEFAULT_CHECK"><![CDATA[(ISDEFAULT = 'N') OR ((ISDEFAULT = 'Y') AND (ISINDEVELOPMENT = 'Y'))]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_MODULE_DBPREFIX.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_MODULE_DBPREFIX.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -41,15 +41,15 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_ORG" name="ADMODULE_DBPREFIX_AD_ORG">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADMODULE_DBPREFIX_ADCLIENT">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_MODULE_DBPREFIX_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_MODULE" name="ADMODULEVERSION_DBPREFIX">
+      <foreign-key foreignTable="AD_MODULE" name="AD_MODULE_DBPREFIX_AD_MODULE">
         <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="AD_MODULE_DBPREFIX_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
       <unique name="AD_MODULE_DB_PREFIX_UN">
         <unique-column name="NAME"/>
       </unique>
--- a/src-db/database/model/tables/AD_MODULE_DBPREFIX_INSTALL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_MODULE_DBPREFIX_INSTALL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -45,12 +45,12 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_ORG" name="ADMODULE_DBPREFIX_INS_AD_ORG">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_MODULE_DBPREFIX_INSTALL_AD_">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="AD_MODULE_DBPREFIX_INSTALL_AD1">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADMODULE_DBPREFIX_INS_ADCLIENT">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <check name="ADMODULEDBPREFIX_INS_ACTIVE_CK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_MODULE_DBPREFIX_INSTALL_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_MODULE_DEPENDENCY.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_MODULE_DEPENDENCY.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -57,19 +57,19 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADMODULEDEPENDENCY_ADCLIENT">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_MODULE_DEPENDENCY_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_MODULE" name="ADMODULEDEPENDENCY_ADMODULE" onDelete="cascade">
+      <foreign-key foreignTable="AD_MODULE" name="AD_MODULE_DEPENDENCY_AD_DEPEND">
+        <reference local="AD_DEPENDENT_MODULE_ID" foreign="AD_MODULE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_MODULE" name="AD_MODULE_DEPENDENCY_AD_MODULE" onDelete="cascade">
         <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_MODULE" name="ADMODULEDEPENDENCY_ADMODULE2">
-        <reference local="AD_DEPENDENT_MODULE_ID" foreign="AD_MODULE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADMODULEDEPENDENCY_ADORG">
+      <foreign-key foreignTable="AD_ORG" name="AD_MODULE_DEPENDENCY_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
+      <check name="AD_MODULE_DEPENDENCY_ISACT_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
       <check name="AD_MODULE_ISINCLUDED_CHK"><![CDATA[ISINCLUDED IN ('Y', 'N')]]></check>
-      <check name="MODULEDEPENDENCY_ACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_MODULE_DEPENDENCY_INST.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_MODULE_DEPENDENCY_INST.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -61,13 +61,13 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADMODULEDEPENDENCYINS_ADCLIENT">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_MODULE_DEPENDENCY_INST_AD_C">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADMODULEDEPENDENCYINS_ADORG">
+      <foreign-key foreignTable="AD_ORG" name="AD_MODULE_DEPENDENCY_INST_AD_O">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
+      <check name="AD_MODULE_DEPENDENCY_INST__CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
       <check name="AD_MODULE_INST_ISINCLUDED_CHK"><![CDATA[ISINCLUDED IN ('Y', 'N')]]></check>
-      <check name="MODULEDEPENDENINST_ACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_MODULE_INSTALL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_MODULE_INSTALL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -145,10 +145,10 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault><![CDATA['N']]></onCreateDefault>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADMODULEINSTALL_ADCLIENT">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_MODULE_INSTALL_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADMODULEINSTALL_ADORG">
+      <foreign-key foreignTable="AD_ORG" name="AD_MODULE_INSTALL_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
       <check name="AD_MOD_INS_INDEVELOPMENT_CHK"><![CDATA[ISINDEVELOPMENT IN ('Y', 'N')]]></check>
@@ -156,6 +156,6 @@
       <check name="AD_MODULE_INS_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
       <check name="AD_MODULE_INS_ISREGISTERED_CHK"><![CDATA[ISREGISTERED IN ('Y', 'N')]]></check>
       <check name="AD_MODULE_INS_TYPE_CHK"><![CDATA[TYPE IN ('M', 'P', 'T')]]></check>
-      <check name="ADMODULE_INS_DEFAULT_CHECK"><![CDATA[(ISDEFAULT = 'N') OR ((ISDEFAULT = 'Y') AND (ISINDEVELOPMENT = 'Y'))]]></check>
+      <check name="AD_MODULE_INSTALL_ISDEFAUL_CHK"><![CDATA[(ISDEFAULT = 'N') OR ((ISDEFAULT = 'Y') AND (ISINDEVELOPMENT = 'Y'))]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_MODULE_TRL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_MODULE_TRL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -65,23 +65,23 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <foreign-key foreignTable="AD_CLIENT" name="AD_MODULE_TRL_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_LANGUAGE" name="AD_MODULE_TRL_AD_LANGUAGE">
+        <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="AD_MODULE_TRL_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_MODULE" name="AD_MODULETRL" onDelete="cascade">
         <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADMODULETRL">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_LANGUAGE" name="ADLANGUAGE_ADMODULETRL">
-        <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADMODULETRL">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
-      <unique name="MODULETRL_MODULEID_LANGUAGE_UN">
+      <unique name="AD_MODULE_TRL_MODULE_LANGUA_UN">
         <unique-column name="AD_MODULE_ID"/>
         <unique-column name="AD_LANGUAGE"/>
       </unique>
-      <check name="ADMODULETRL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADMODULETRL_ISTRANSLATED_CHECK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
+      <check name="AD_MODULE_TRL_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_MODULE_TRL_ISTRANSLATED_CHK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_MONTH.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_MONTH.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -45,10 +45,10 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADMONTH">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_MONTH_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADMONTH">
+      <foreign-key foreignTable="AD_ORG" name="AD_MONTH_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
     </table>
--- a/src-db/database/model/tables/AD_MONTH_TRL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_MONTH_TRL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,23 +49,23 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADMONTHTRL">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_MONTH_TRL_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_LANGUAGE" name="ADLANGUAGE_ADMONTHTRL">
+      <foreign-key foreignTable="AD_LANGUAGE" name="AD_MONTH_TRL_AD_LANGUAGE">
         <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_MONTH" name="ADMONTH_ADMONTHTRL" onDelete="cascade">
+      <foreign-key foreignTable="AD_MONTH" name="AD_MONTH_TRL_AD_MONTH" onDelete="cascade">
         <reference local="AD_MONTH_ID" foreign="AD_MONTH_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADMONTHTRL">
+      <foreign-key foreignTable="AD_ORG" name="AD_MONTH_TRL_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <unique name="ADMONTHTRL_ADMONTHI_UN">
+      <unique name="AD_MONTH_TRL_MONTH_LANGUAGE_UN">
         <unique-column name="AD_MONTH_ID"/>
         <unique-column name="AD_LANGUAGE"/>
       </unique>
-      <check name="ADMONTHTRL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADMONTHTRL_ISTRANSLATED_CHECK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
+      <check name="AD_MONTH_TRL_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_MONTH_TRL_ISTRANSLATED_CHK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_NOTE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_NOTE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -61,22 +61,22 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADNOTE">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_NOTE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_MESSAGE" name="ADMESSAGE_ADNOTE" onDelete="cascade">
+      <foreign-key foreignTable="AD_MESSAGE" name="AD_NOTE_AD_MESSAGE" onDelete="cascade">
         <reference local="AD_MESSAGE_ID" foreign="AD_MESSAGE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADNOTE">
+      <foreign-key foreignTable="AD_ORG" name="AD_NOTE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_TABLE" name="ADTABLE_ADNOTE" onDelete="cascade">
+      <foreign-key foreignTable="AD_TABLE" name="AD_NOTE_AD_TABLE" onDelete="cascade">
         <reference local="AD_TABLE_ID" foreign="AD_TABLE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_USER" name="ADUSER_ADNOTE">
+      <foreign-key foreignTable="AD_USER" name="AD_NOTE_AD_USER">
         <reference local="AD_USER_ID" foreign="AD_USER_ID"/>
       </foreign-key>
-      <check name="ADNOTE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADNOTE_PROCESSED_CHECK"><![CDATA[PROCESSED IN ('Y', 'N')]]></check>
+      <check name="AD_NOTE_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_NOTE_PROCESSED_CHK"><![CDATA[PROCESSED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_ORG.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_ORG.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -61,13 +61,13 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault><![CDATA['N']]></onCreateDefault>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADORG">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_ORG_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORGTYPE" name="ADORGTYPE_ADORG">
+      <foreign-key foreignTable="AD_ORGTYPE" name="AD_ORG_AD_ORGTYPE">
         <reference local="AD_ORGTYPE_ID" foreign="AD_ORGTYPE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_CALENDAR" name="CCALENDAR_ADORG">
+      <foreign-key foreignTable="C_CALENDAR" name="AD_ORG_C_CALENDAR">
         <reference local="C_CALENDAR_ID" foreign="C_CALENDAR_ID"/>
       </foreign-key>
       <unique name="AD_ORG_VALUE">
--- a/src-db/database/model/tables/AD_ORGINFO.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_ORGINFO.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -60,18 +60,18 @@
       <foreign-key foreignTable="AD_ORG" name="AD_ORG_AD_ORGINFO" onDelete="cascade">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="AD_ORGINFO_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_BPARTNER" name="AD_ORGINFO_C_BPARTNER">
+        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_IMAGE" name="AD_ORGINFO_IMAGEDOCUM">
         <reference local="YOUR_COMPANY_DOCUMENT_IMAGE" foreign="AD_IMAGE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADORGINFO">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
       <foreign-key foreignTable="C_LOCATION" name="C_LOCATION_AD_ORGINFO">
         <reference local="C_LOCATION_ID" foreign="C_LOCATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BPARTNER" name="CBPARTNER_ADORGINFO">
-        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
-      </foreign-key>
       <check name="AD_ORGINFO_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_ORGMODULE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_ORGMODULE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -41,15 +41,15 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <foreign-key foreignTable="AD_CLIENT" name="AD_ORGMODULE_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_MODULE" name="AD_ORGMODULE_AD_MODULE" onDelete="cascade">
+        <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_ORG" name="AD_ORGMODULE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADORGMODULE">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_MODULE" name="ADMODULE_ADORGMODULE" onDelete="cascade">
-        <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
-      </foreign-key>
       <check name="AD_ORGMODULE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_ORGTYPE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_ORGTYPE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -61,10 +61,10 @@
         <default/>
         <onCreateDefault><![CDATA['N']]></onCreateDefault>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADORGTYPE">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_ORGTYPE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADORGTYPE">
+      <foreign-key foreignTable="AD_ORG" name="AD_ORGTYPE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
       <check name="AD_ORGTYPE_ISACCTLE_CHECK"><![CDATA[ISACCTLEGALENTITY IN ('Y', 'N')]]></check>
@@ -72,7 +72,7 @@
       <check name="AD_ORGTYPE_ISBU_CHECK"><![CDATA[ISBUSINESSUNIT IN ('Y', 'N')]]></check>
       <check name="AD_ORGTYPE_ISDEFAULT_CHECK"><![CDATA[ISDEFAULT IN ('Y', 'N')]]></check>
       <check name="AD_ORGTYPE_ISLEGALENTITY_CHECK"><![CDATA[ISLEGALENTITY IN ('Y', 'N')]]></check>
+      <check name="AD_ORGTYPE_ISLEGALENTITY_CHK"><![CDATA[(((ISLEGALENTITY = 'Y') AND (ISBUSINESSUNIT = 'N')) OR ((ISLEGALENTITY = 'N') AND (ISBUSINESSUNIT = 'Y'))) OR ((ISLEGALENTITY = 'N') AND (ISBUSINESSUNIT = 'N'))]]></check>
       <check name="AD_ORGTYPE_ISTRALLOWED_CHECK"><![CDATA[ISTRANSACTIONSALLOWED IN ('Y', 'N')]]></check>
-      <check name="ISLE_ISBU_EXCLUDE"><![CDATA[(((ISLEGALENTITY = 'Y') AND (ISBUSINESSUNIT = 'N')) OR ((ISLEGALENTITY = 'N') AND (ISBUSINESSUNIT = 'Y'))) OR ((ISLEGALENTITY = 'N') AND (ISBUSINESSUNIT = 'N'))]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_ORG_ACCTSCHEMA.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_ORG_ACCTSCHEMA.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -61,23 +61,23 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADORGACCTSCHEMA">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_ORG_ACCTSCHEMA_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADORGACCTSCHEMA">
+      <foreign-key foreignTable="AD_ORG" name="AD_ORG_ACCTSCHEMA_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_SEQUENCE" name="ADSEQUENCEBP_ADORGACCTSCHEMA">
+      <foreign-key foreignTable="AD_SEQUENCE" name="AD_ORG_ACCTSCHEMA_AD_SEQUENCE_">
         <reference local="AD_SEQUENCE_BP_ID" foreign="AD_SEQUENCE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_SEQUENCE" name="ADSEQUENCEPR_ADORGACCTSCHEMA">
+      <foreign-key foreignTable="AD_SEQUENCE" name="AD_ORG_ACCTSCHEMA_AD_SEQUENCE1">
         <reference local="AD_SEQUENCE_PR_ID" foreign="AD_SEQUENCE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ACCTSCHEMA" name="CACCTSCHEMA_ADORGACCTSCHEMA">
+      <foreign-key foreignTable="C_ACCTSCHEMA" name="AD_ORG_ACCTSCHEMA_C_ACCTSCHEMA">
         <reference local="C_ACCTSCHEMA_ID" foreign="C_ACCTSCHEMA_ID"/>
       </foreign-key>
-      <check name="ADORGACCTSCH_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADORGACCTSCH_ISBPNEWACCT_CHECK"><![CDATA[ISBPNEWACCOUNT IN ('Y', 'N')]]></check>
-      <check name="ADORGACCTSCH_ISPRNEWACCT_CHECK"><![CDATA[ISPRNEWACCOUNT IN ('Y', 'N')]]></check>
+      <check name="AD_ORG_ACCTSCHEMA_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_ORG_ACCTSCHEMA_ISBPNEWA_CHK"><![CDATA[ISBPNEWACCOUNT IN ('Y', 'N')]]></check>
+      <check name="AD_ORG_ACCTSCHEMA_ISPRNEWA_CHK"><![CDATA[ISPRNEWACCOUNT IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_ORG_CLOSING.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_ORG_CLOSING.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -57,17 +57,17 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <foreign-key foreignTable="AD_CLIENT" name="AD_ORG_CLOSING_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="AD_ORG_CLOSING_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG_ACCTSCHEMA" name="AD_ORG_CLOSING_AD_ORG_ACCTSCHE">
+        <reference local="AD_ORG_ACCTSCHEMA_ID" foreign="AD_ORG_ACCTSCHEMA_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="C_YEAR" name="AD_ORG_CLOSING_C_YEAR">
         <reference local="C_YEAR_ID" foreign="C_YEAR_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADORGCLOSING">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADORGCLOSING">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG_ACCTSCHEMA" name="ADORGCLOSING_ADORGACCTSCHEMA">
-        <reference local="AD_ORG_ACCTSCHEMA_ID" foreign="AD_ORG_ACCTSCHEMA_ID"/>
-      </foreign-key>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_PACKAGE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_PACKAGE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,13 +49,13 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="PACKAGECLIENT">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_PACKAGE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_MODULE" name="PACKAGEMODULE">
+      <foreign-key foreignTable="AD_MODULE" name="AD_PACKAGE_AD_MODULE">
         <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="PACKAGEORG">
+      <foreign-key foreignTable="AD_ORG" name="AD_PACKAGE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
       <unique name="AD_PACKAGE_JAVANAME">
@@ -64,6 +64,6 @@
       <unique name="AD_PACKAGE_NAME">
         <unique-column name="NAME"/>
       </unique>
-      <check name="ADPACKAGE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_PACKAGE_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_PINSTANCE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_PINSTANCE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -57,16 +57,16 @@
         <default><![CDATA[Y]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADPINSTANCE">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_PINSTANCE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADPINSTANCE">
+      <foreign-key foreignTable="AD_ORG" name="AD_PINSTANCE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_PROCESS" name="ADPROCESS_ADPINSTANCE" onDelete="cascade">
+      <foreign-key foreignTable="AD_PROCESS" name="AD_PINSTANCE_AD_PROCESS" onDelete="cascade">
         <reference local="AD_PROCESS_ID" foreign="AD_PROCESS_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_USER" name="ADUSER_PINSTANCE">
+      <foreign-key foreignTable="AD_USER" name="AD_PINSTANCE_AD_USER">
         <reference local="AD_USER_ID" foreign="AD_USER_ID"/>
       </foreign-key>
       <index name="AD_PINSTANCE_RECORD" unique="false">
--- a/src-db/database/model/tables/AD_PINSTANCE_PARA.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_PINSTANCE_PARA.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -77,16 +77,16 @@
         <default><![CDATA[Y]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADPINSTANCEPARA">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_PINSTANCE_PARA_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADPINSTANCEPARA">
+      <foreign-key foreignTable="AD_ORG" name="AD_PINSTANCE_PARA_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_PINSTANCE" name="ADPINSTANCE_ADPINSTANCEPARA" onDelete="cascade">
+      <foreign-key foreignTable="AD_PINSTANCE" name="AD_PINSTANCE_PARA_AD_PINSTANCE" onDelete="cascade">
         <reference local="AD_PINSTANCE_ID" foreign="AD_PINSTANCE_ID"/>
       </foreign-key>
-      <unique name="ADPINSTANCEPARA_ADPINSTANCE_UN">
+      <unique name="AD_PINSTANCE_PARA_PINSTANCE_UN">
         <unique-column name="AD_PINSTANCE_ID"/>
         <unique-column name="SEQNO"/>
       </unique>
--- a/src-db/database/model/tables/AD_PROCESS.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_PROCESS.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -105,21 +105,21 @@
         <default><![CDATA[S]]></default>
         <onCreateDefault><![CDATA[CASE WHEN PROCEDURENAME IS NOT NULL THEN 'S' WHEN ISJASPER='Y' THEN 'S' ELSE 'M' END]]></onCreateDefault>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADPROCESS">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_PROCESS_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_MODULE" name="ADMODULE_ADPROCESS">
+      <foreign-key foreignTable="AD_MODULE" name="AD_PROCESS_AD_MODULE">
         <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADPROCESS">
+      <foreign-key foreignTable="AD_ORG" name="AD_PROCESS_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <check name="ADPROC_EXTERNALSERVICE_CHECK"><![CDATA[ISEXTERNALSERVICE IN ('Y', 'N')]]></check>
-      <check name="ADPROCESS_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADPROCESS_ISBACKGROUND_CHECK"><![CDATA[ISBACKGROUND IN ('Y', 'N')]]></check>
-      <check name="ADPROCESS_ISDIRECTPRINT_CHECK"><![CDATA[ISDIRECTPRINT IN ('Y', 'N')]]></check>
-      <check name="ADPROCESS_ISREPORT_CHECK"><![CDATA[ISREPORT IN ('Y', 'N')]]></check>
-      <check name="ADPROCESS_ISUSE_TARTABLE_CHECK"><![CDATA[ISUSERSTARTABLE IN ('Y', 'N')]]></check>
-      <check name="ADPROCESS_UIPATTERN_CHECK"><![CDATA[UIPATTERN IN ('S', 'M')]]></check>
+      <check name="AD_PROCESS_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_PROCESS_ISBACKGROUND_CHK"><![CDATA[ISBACKGROUND IN ('Y', 'N')]]></check>
+      <check name="AD_PROCESS_ISDIRECTPRINT_CHK"><![CDATA[ISDIRECTPRINT IN ('Y', 'N')]]></check>
+      <check name="AD_PROCESS_ISEXTERNALSERVI_CHK"><![CDATA[ISEXTERNALSERVICE IN ('Y', 'N')]]></check>
+      <check name="AD_PROCESS_ISREPORT_CHK"><![CDATA[ISREPORT IN ('Y', 'N')]]></check>
+      <check name="AD_PROCESS_ISUSERSTARTABLE_CHK"><![CDATA[ISUSERSTARTABLE IN ('Y', 'N')]]></check>
+      <check name="AD_PROCESS_UIPATTERN_CHK"><![CDATA[UIPATTERN IN ('S', 'M')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_PROCESS_ACCESS.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_PROCESS_ACCESS.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -45,23 +45,23 @@
         <default><![CDATA[Y]]></default>
         <onCreateDefault/>
       </column>
+      <foreign-key foreignTable="AD_PROCESS" name="AD_PROCESS_ACCESS_AD_PROCESS" onDelete="cascade">
+        <reference local="AD_PROCESS_ID" foreign="AD_PROCESS_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ROLE" name="AD_PROCESS_ACCESS_AD_ROLE" onDelete="cascade">
+        <reference local="AD_ROLE_ID" foreign="AD_ROLE_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_CLIENT" name="AD_PROCESSACCESS_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
       <foreign-key foreignTable="AD_ORG" name="AD_PROCESSTACCESS_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_PROCESS" name="ADPROCESS_ADPROCESSACCESS" onDelete="cascade">
-        <reference local="AD_PROCESS_ID" foreign="AD_PROCESS_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ROLE" name="ADROLE_ADPROCESSACCESS" onDelete="cascade">
-        <reference local="AD_ROLE_ID" foreign="AD_ROLE_ID"/>
-      </foreign-key>
       <index name="AD_PROCESS_ACCESS_UN_KEY" unique="true">
         <index-column name="AD_ROLE_ID"/>
         <index-column name="AD_PROCESS_ID"/>
       </index>
-      <check name="ADPROCACC_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADPROCACC_ISREADWRITE_CHECK"><![CDATA[ISREADWRITE IN ('Y', 'N')]]></check>
+      <check name="AD_PROCESS_ACCESS_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_PROCESS_ACCESS_ISREADWR_CHK"><![CDATA[ISREADWRITE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_PROCESS_PARA.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_PROCESS_PARA.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -109,33 +109,33 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADPROCESSPARA">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_PROCESS_PARA_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ELEMENT" name="ADELEMENT_ADPROCESSPARA">
+      <foreign-key foreignTable="AD_ELEMENT" name="AD_PROCESS_PARA_AD_ELEMENT">
         <reference local="AD_ELEMENT_ID" foreign="AD_ELEMENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADPROCESSPARA">
+      <foreign-key foreignTable="AD_ORG" name="AD_PROCESS_PARA_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_PROCESS" name="ADPROCESS_ADPROCESSPARA" onDelete="cascade">
+      <foreign-key foreignTable="AD_PROCESS" name="AD_PROCESS_PARA_AD_PROCESS" onDelete="cascade">
         <reference local="AD_PROCESS_ID" foreign="AD_PROCESS_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_REFERENCE" name="ADREFERENCE_ADPROCESSPARA">
+      <foreign-key foreignTable="AD_REFERENCE" name="AD_PROCESS_PARA_AD_REFERENCE">
         <reference local="AD_REFERENCE_ID" foreign="AD_REFERENCE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_REFERENCE" name="ADREFERENCEVALUE_ADPROCPARA">
+      <foreign-key foreignTable="AD_REFERENCE" name="AD_PROCESS_PARA_AD_REFERENCE_V">
         <reference local="AD_REFERENCE_VALUE_ID" foreign="AD_REFERENCE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_VAL_RULE" name="ADVALRULE_AD_PROCESSPARA">
+      <foreign-key foreignTable="AD_VAL_RULE" name="AD_PROCESS_PARA_AD_VAL_RULE">
         <reference local="AD_VAL_RULE_ID" foreign="AD_VAL_RULE_ID"/>
       </foreign-key>
       <index name="AD_PROCESS_PARA_PROCESS" unique="false">
         <index-column name="AD_PROCESS_ID"/>
       </index>
-      <check name="ADPROCPARA_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADPROCPARA_ISCENTMAINT_CHECK"><![CDATA[ISCENTRALLYMAINTAINED IN ('Y', 'N')]]></check>
-      <check name="ADPROCPARA_ISMANDATORY_CHECK"><![CDATA[ISMANDATORY IN ('Y', 'N')]]></check>
-      <check name="ADPROCPARA_ISRANGE_CHECK"><![CDATA[ISRANGE IN ('Y', 'N')]]></check>
+      <check name="AD_PROCESS_PARA_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_PROCESS_PARA_ISCENTRALL_CHK"><![CDATA[ISCENTRALLYMAINTAINED IN ('Y', 'N')]]></check>
+      <check name="AD_PROCESS_PARA_ISMANDATOR_CHK"><![CDATA[ISMANDATORY IN ('Y', 'N')]]></check>
+      <check name="AD_PROCESS_PARA_ISRANGE_CHK"><![CDATA[ISRANGE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_PROCESS_PARA_TRL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_PROCESS_PARA_TRL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -57,23 +57,23 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADPROCESSPARATRL">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_PROCESS_PARA_TRL_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_LANGUAGE" name="ADLANGUAGE_ADPROCESSPARATRL">
+      <foreign-key foreignTable="AD_LANGUAGE" name="AD_PROCESS_PARA_TRL_AD_LANGUAG">
         <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADPROCESSPARATRL">
+      <foreign-key foreignTable="AD_ORG" name="AD_PROCESS_PARA_TRL_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_PROCESS_PARA" name="ADPROCPARA_ADPROCPARATRL" onDelete="cascade">
+      <foreign-key foreignTable="AD_PROCESS_PARA" name="AD_PROCESS_PARA_TRL_AD_PROCESS" onDelete="cascade">
         <reference local="AD_PROCESS_PARA_ID" foreign="AD_PROCESS_PARA_ID"/>
       </foreign-key>
-      <unique name="ADPROCESSPARATRL_ADPROCESSP_UN">
+      <unique name="AD_PROCESS_PARA_TRL_PROCESS_UN">
         <unique-column name="AD_PROCESS_PARA_ID"/>
         <unique-column name="AD_LANGUAGE"/>
       </unique>
-      <check name="ADPRPARATRL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADPRPARATRL_ISTRANSLATED_CHECK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
+      <check name="AD_PROCESS_PARA_TRL_ISACTI_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_PROCESS_PARA_TRL_ISTRAN_CHK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_PROCESS_RUN.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_PROCESS_RUN.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -71,7 +71,7 @@
       <foreign-key foreignTable="AD_ORG" name="AD_PROCESS_RUN_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_PROCESS_REQUEST" name="PROCESSREQUEST_PROCESSRUN_FK" onDelete="cascade">
+      <foreign-key foreignTable="AD_PROCESS_REQUEST" name="AD_PROCESS_RUN_AD_PROCESS_REQU" onDelete="cascade">
         <reference local="AD_PROCESS_REQUEST_ID" foreign="AD_PROCESS_REQUEST_ID"/>
       </foreign-key>
     </table>
--- a/src-db/database/model/tables/AD_PROCESS_SCHEDULING.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_PROCESS_SCHEDULING.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -57,13 +57,13 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="CLIENT_FK_PROCESS_SCHEDULING">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_PROCESS_SCHEDULING_AD_CLIEN">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ORG_FK_PROCESS_SCHEDULING">
+      <foreign-key foreignTable="AD_ORG" name="AD_PROCESS_SCHEDULING_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_PROCESS" name="PROCESS_FK_PROCESS_SCHEDULING" onDelete="cascade">
+      <foreign-key foreignTable="AD_PROCESS" name="AD_PROCESS_SCHEDULING_AD_PROCE" onDelete="cascade">
         <reference local="AD_PROCESS_ID" foreign="AD_PROCESS_ID"/>
       </foreign-key>
       <check name="AD_PROCESS_SCHEDULING_ISFT"><![CDATA[ISFULLTIME IN ('Y', 'N')]]></check>
--- a/src-db/database/model/tables/AD_PROCESS_TRL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_PROCESS_TRL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -63,17 +63,17 @@
       <foreign-key foreignTable="AD_PROCESS" name="AD_PROCESS_AD_PROCESS_TRL" onDelete="cascade">
         <reference local="AD_PROCESS_ID" foreign="AD_PROCESS_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADPROCESSTRL">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_PROCESS_TRL_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADPROCESSTRL">
+      <foreign-key foreignTable="AD_ORG" name="AD_PROCESS_TRL_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <unique name="ADPROCESSTRL_ADPROCESSID_AD_UN">
+      <unique name="AD_PROCESS_TRL_PROCESS_LANG_UN">
         <unique-column name="AD_PROCESS_ID"/>
         <unique-column name="AD_LANGUAGE"/>
       </unique>
-      <check name="ADPROCESSTRL_IS_ANSLATED_CHECK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
-      <check name="ADPROCESSTRL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_PROCESS_TRL_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_PROCESS_TRL_ISTRANSLATE_CHK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_RECORD_ACCESS.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_RECORD_ACCESS.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -53,19 +53,19 @@
         <default><![CDATA[Y]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADRECORDACCESS">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_RECORD_ACCESS_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADRECORDACCESS">
+      <foreign-key foreignTable="AD_ORG" name="AD_RECORD_ACCESS_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ROLE" name="ADROLE_ARDECORDACCESS">
+      <foreign-key foreignTable="AD_ROLE" name="AD_RECORD_ACCESS_AD_ROLE">
         <reference local="AD_ROLE_ID" foreign="AD_ROLE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_TABLE" name="ADTABLE_ADRECORDACCESS" onDelete="cascade">
+      <foreign-key foreignTable="AD_TABLE" name="AD_RECORD_ACCESS_AD_TABLE" onDelete="cascade">
         <reference local="AD_TABLE_ID" foreign="AD_TABLE_ID"/>
       </foreign-key>
-      <unique name="ADRECORDACCESS_ADROLEID_ADT_UN">
+      <unique name="AD_RECORD_ACCESS_ROLE_TABLE_UN">
         <unique-column name="AD_ROLE_ID"/>
         <unique-column name="AD_TABLE_ID"/>
         <unique-column name="RECORD_ID"/>
--- a/src-db/database/model/tables/AD_REFERENCE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_REFERENCE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -57,17 +57,18 @@
         <default><![CDATA[0]]></default>
         <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">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_REFERENCE_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_MODULE" name="AD_REFERENCE_AD_MODULE">
         <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="REFERENCECLIENT">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="REFERENCEORG">
+      <foreign-key foreignTable="AD_ORG" name="AD_REFERENCE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
       <unique name="AD_REFERENCE_NAME">
         <unique-column name="NAME"/>
+        <unique-column name="AD_MODULE_ID"/>
       </unique>
       <check name="AD_REFERENCE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
--- a/src-db/database/model/tables/AD_REFERENCE_TRL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_REFERENCE_TRL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -60,20 +60,20 @@
       <foreign-key foreignTable="AD_LANGUAGE" name="AD_LANGUAGE_REFERENCETRL">
         <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="AD_REFERENCE_TRL_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="AD_REFERENCE_TRL_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_REFERENCE" name="AD_REFERENCETRL" onDelete="cascade">
         <reference local="AD_REFERENCE_ID" foreign="AD_REFERENCE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADREFERENCETRL">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADREFERENCETRL">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
-      <unique name="ADREFERENCETRL_ADREFERENCEI_UN">
+      <unique name="AD_REFERENCE_TRL_REFERENCE__UN">
         <unique-column name="AD_REFERENCE_ID"/>
         <unique-column name="AD_LANGUAGE"/>
       </unique>
-      <check name="ADREFTRL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADREFTRL_ISTRANSLATED_CHECK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
+      <check name="AD_REFERENCE_TRL_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_REFERENCE_TRL_ISTRANSLA_CHK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_REF_DATA_LOADED.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_REF_DATA_LOADED.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,18 +49,18 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <foreign-key foreignTable="AD_CLIENT" name="AD_REF_DATA_LOADED_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_MODULE" name="AD_REF_DATA_LOADED_AD_MODULE" onDelete="cascade">
+        <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="AD_REF_DATA_LOADED_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_TABLE" name="AD_REF_DATA_LOADED_AD_TABLE" onDelete="cascade">
         <reference local="AD_TABLE_ID" foreign="AD_TABLE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADREFDATALOADED">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_MODULE" name="ADMODULE_ADREFDATALOADED" onDelete="cascade">
-        <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADREFDATALOADED">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
       <check name="AD_REFDATALOAD_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_REF_LIST_TRL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_REF_LIST_TRL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -56,20 +56,20 @@
       <foreign-key foreignTable="AD_LANGUAGE" name="AD_LANGUAGE_REFLISTTRL">
         <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="AD_REF_LIST_TRL_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="AD_REF_LIST_TRL_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_REF_LIST" name="AD_REFLISTTRL" onDelete="cascade">
         <reference local="AD_REF_LIST_ID" foreign="AD_REF_LIST_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADREFLISTTRL">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADREFLISTTRL">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
-      <unique name="ADREFLISTTRL_ADREFLISTID_AD_UN">
+      <unique name="AD_REF_LIST_TRL_REF_LIST_LA_UN">
         <unique-column name="AD_REF_LIST_ID"/>
         <unique-column name="AD_LANGUAGE"/>
       </unique>
-      <check name="ADREFLISTTRL_IS_ANSLATED_CHECK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
-      <check name="ADREFLISTTRL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_REF_LIST_TRL_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_REF_LIST_TRL_ISTRANSLAT_CHK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_REF_SEARCH.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_REF_SEARCH.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -45,19 +45,19 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <foreign-key foreignTable="AD_CLIENT" name="AD_REF_SEARCH_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_COLUMN" name="AD_REF_SEARCH_AD_COLUMN">
+        <reference local="AD_COLUMN_ID" foreign="AD_COLUMN_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="AD_REF_SEARCH_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_REFERENCE" name="AD_REF_SEARCH_AD_REFERENCE">
         <reference local="AD_REFERENCE_ID" foreign="AD_REFERENCE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="REFSEARCH_FK_CLIENT">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_COLUMN" name="REFSEARCH_FK_COLUMN">
-        <reference local="AD_COLUMN_ID" foreign="AD_COLUMN_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="REFSEARCH_FK_ORG">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_TABLE" name="REFSEARCH_FK_TABLE">
+      <foreign-key foreignTable="AD_TABLE" name="AD_REF_SEARCH_AD_TABLE">
         <reference local="AD_TABLE_ID" foreign="AD_TABLE_ID"/>
       </foreign-key>
       <check name="AD_REF_SEARCH_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
--- a/src-db/database/model/tables/AD_REF_SEARCH_COLUMN.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_REF_SEARCH_COLUMN.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -53,15 +53,15 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_REF_SEARCH" name="ADREFSEARCH_ADREFSEARCHCOLUMN">
-        <reference local="AD_REF_SEARCH_ID" foreign="AD_REF_SEARCH_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="REFSEARCHCOLUMN_FK_CLIENT">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_REF_SEARCH_COLUMN_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="REFSEARCHCOLUMN_FK_ORG">
+      <foreign-key foreignTable="AD_ORG" name="AD_REF_SEARCH_COLUMN_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_REF_SEARCH" name="AD_REF_SEARCH_COLUMN_AD_REF_SE">
+        <reference local="AD_REF_SEARCH_ID" foreign="AD_REF_SEARCH_ID"/>
+      </foreign-key>
       <check name="AD_REF_SEARCH_C_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_REF_TABLE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_REF_TABLE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -63,19 +63,19 @@
       <foreign-key foreignTable="AD_COLUMN" name="AD_COLUMN_REFTABLE_ID">
         <reference local="AD_KEY" foreign="AD_COLUMN_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="AD_REF_TABLE_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="AD_REF_TABLE_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_TABLE" name="AD_REF_TABLE_AD_TABLE">
+        <reference local="AD_TABLE_ID" foreign="AD_TABLE_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_REFERENCE" name="AD_REFERENCE_REFTABLE" onDelete="cascade">
         <reference local="AD_REFERENCE_ID" foreign="AD_REFERENCE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_TABLE" name="ADD_TABLE_REFTABLE">
-        <reference local="AD_TABLE_ID" foreign="AD_TABLE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="REF_TABLECLIENT">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="REF_TABLEORG">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
-      <check name="ADREFTABLE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADREFTABLE_ISVALUEDISP_CHECK"><![CDATA[ISVALUEDISPLAYED IN ('Y', 'N')]]></check>
+      <check name="AD_REF_TABLE_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_REF_TABLE_ISVALUEDISPLA_CHK"><![CDATA[ISVALUEDISPLAYED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_ROLE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_ROLE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -73,15 +73,15 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <foreign-key foreignTable="AD_TREE" name="AD_ROLE_AD_TREE_MENU">
+        <reference local="AD_TREE_MENU_ID" foreign="AD_TREE_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_CLIENT" name="AD_ROLECLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
       <foreign-key foreignTable="AD_ORG" name="AD_ROLEORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_TREE" name="ADTREE_ADROLE">
-        <reference local="AD_TREE_MENU_ID" foreign="AD_TREE_ID"/>
-      </foreign-key>
       <foreign-key foreignTable="C_CURRENCY" name="C_CURRENCY_AD_ROLE">
         <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
       </foreign-key>
--- a/src-db/database/model/tables/AD_ROLE_ORGACCESS.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_ROLE_ORGACCESS.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -37,16 +37,16 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADROLEORGACCESS">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_ROLE_ORGACCESS_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADROLEORGACCESS" onDelete="cascade">
+      <foreign-key foreignTable="AD_ORG" name="AD_ROLE_ORGACCESS_AD_ORG" onDelete="cascade">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ROLE" name="ADROLE_ADROLEORGACCESS" onDelete="cascade">
+      <foreign-key foreignTable="AD_ROLE" name="AD_ROLE_ORGACCESS_AD_ROLE" onDelete="cascade">
         <reference local="AD_ROLE_ID" foreign="AD_ROLE_ID"/>
       </foreign-key>
-      <unique name="ADROLEORGACCESS_ADROLEID_AD_UN">
+      <unique name="AD_ROLE_ORGACCESS_ROLE_ORG_UN">
         <unique-column name="AD_ROLE_ID"/>
         <unique-column name="AD_ORG_ID"/>
       </unique>
--- a/src-db/database/model/tables/AD_SEQUENCE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_SEQUENCE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -81,19 +81,19 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="SEQUENCECLIENT">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_SEQUENCE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="SEQUENCEORG">
+      <foreign-key foreignTable="AD_ORG" name="AD_SEQUENCE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
       <unique name="AD_SEQUENCE_NAME">
         <unique-column name="AD_CLIENT_ID"/>
         <unique-column name="NAME"/>
       </unique>
-      <check name="ADSEQ_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADSEQ_ISAUTOSEQUENCE_CHECK"><![CDATA[ISAUTOSEQUENCE IN ('Y', 'N')]]></check>
-      <check name="ADSEQ_ISTABLEID_CHECK"><![CDATA[ISTABLEID IN ('Y', 'N')]]></check>
-      <check name="ADSEQ_STARTNEWYEAR_CHECK"><![CDATA[STARTNEWYEAR IN ('Y', 'N')]]></check>
+      <check name="AD_SEQUENCE_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_SEQUENCE_ISAUTOSEQUENCE_CHK"><![CDATA[ISAUTOSEQUENCE IN ('Y', 'N')]]></check>
+      <check name="AD_SEQUENCE_ISTABLEID_CHK"><![CDATA[ISTABLEID IN ('Y', 'N')]]></check>
+      <check name="AD_SEQUENCE_STARTNEWYEAR_CHK"><![CDATA[STARTNEWYEAR IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_SESSION.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_SESSION.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -57,10 +57,10 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADSESSION">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_SESSION_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADSESSION">
+      <foreign-key foreignTable="AD_ORG" name="AD_SESSION_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
       <check name="AD_SESSION_ACTIVE_CHK"><![CDATA[SESSION_ACTIVE IN ('Y', 'N')]]></check>
--- a/src-db/database/model/tables/AD_SESSION_STATUS.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_SESSION_STATUS.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="TABLE AD_SESSION_STATUS">
-    <table name="AD_SESSION_STATUS" primaryKey="ADSESSIONSTATUS_KEY">
+    <table name="AD_SESSION_STATUS" primaryKey="AD_SESSION_STATUS_KEY">
       <column name="AD_SESSION_STATUS_ID" primaryKey="true" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
         <onCreateDefault/>
@@ -37,13 +37,13 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADSESSIONSTATUS">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_SESSION_STATUS_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADSESSIONSTATUS">
+      <foreign-key foreignTable="AD_ORG" name="AD_SESSION_STATUS_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <check name="ADSESSIONSTATUS_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADSESSIONSTATUS_ISIMPORT_CHECK"><![CDATA[ISIMPORTING IN ('Y', 'N')]]></check>
+      <check name="AD_SESSION_STATUS_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_SESSION_STATUS_ISIMPORT_CHK"><![CDATA[ISIMPORTING IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_SYSTEM.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_SYSTEM.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -73,10 +73,10 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADSYSTEM">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_SYSTEM_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADSYSTEM">
+      <foreign-key foreignTable="AD_ORG" name="AD_SYSTEM_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
       <check name="AD_SYSTEM_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
--- a/src-db/database/model/tables/AD_SYSTEM_INFO.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_SYSTEM_INFO.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -158,6 +158,6 @@
       <foreign-key foreignTable="AD_IMAGE" name="AD_SYSTEM_INFO_IMAGEMENUCOMP">
         <reference local="YOUR_COMPANY_MENU_IMAGE" foreign="AD_IMAGE_ID"/>
       </foreign-key>
-      <check name="ADSYSTEMINFO_CUSTOMALLOW_CHECK"><![CDATA[CUSTOMIZATION_ALLOWED IN ('Y', 'N')]]></check>
+      <check name="AD_SYSTEM_INFO_CUSTOMIZATI_CHK"><![CDATA[CUSTOMIZATION_ALLOWED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_TAB.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_TAB.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -148,39 +148,39 @@
       <foreign-key foreignTable="AD_COLUMN" name="AD_COLUMN_AD_TAB">
         <reference local="AD_COLUMN_ID" foreign="AD_COLUMN_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="AD_TAB_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_COLUMN" name="AD_TAB_AD_COLUMNSORTORDER">
+        <reference local="AD_COLUMNSORTORDER_ID" foreign="AD_COLUMN_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_COLUMN" name="AD_TAB_AD_COLUMNSORTYESNO">
+        <reference local="AD_COLUMNSORTYESNO_ID" foreign="AD_COLUMN_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_IMAGE" name="AD_TAB_AD_IMAGE">
+        <reference local="AD_IMAGE_ID" foreign="AD_IMAGE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_MODULE" name="AD_TAB_AD_MODULE">
+        <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="AD_TAB_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_PROCESS" name="AD_TAB_AD_PROCESS">
+        <reference local="AD_PROCESS_ID" foreign="AD_PROCESS_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_FORM" name="AD_TAB_EDITREFERENCE">
+        <reference local="EDITREFERENCE" foreign="AD_FORM_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_TAB" name="AD_TAB_INCLUDED_TAB">
+        <reference local="INCLUDED_TAB_ID" foreign="AD_TAB_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_TABLE" name="AD_TABLE_TAB">
         <reference local="AD_TABLE_ID" foreign="AD_TABLE_ID"/>
       </foreign-key>
       <foreign-key foreignTable="AD_WINDOW" name="AD_WINDOW_TAB" onDelete="cascade">
         <reference local="AD_WINDOW_ID" foreign="AD_WINDOW_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_COLUMN" name="ADCOLUMN_ADTABSORTORDER">
-        <reference local="AD_COLUMNSORTORDER_ID" foreign="AD_COLUMN_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_COLUMN" name="ADCOLUMN_ADTABSORTYESNO">
-        <reference local="AD_COLUMNSORTYESNO_ID" foreign="AD_COLUMN_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_FORM" name="ADFORM_ADTAB">
-        <reference local="EDITREFERENCE" foreign="AD_FORM_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_IMAGE" name="ADIMAGE_ADTAB">
-        <reference local="AD_IMAGE_ID" foreign="AD_IMAGE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_MODULE" name="ADMODULE_ADTAB">
-        <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_PROCESS" name="ADPROCESS_ADTAB">
-        <reference local="AD_PROCESS_ID" foreign="AD_PROCESS_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_TAB" name="ADTAB_INCLUDED">
-        <reference local="INCLUDED_TAB_ID" foreign="AD_TAB_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="TABCLIENT">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="TABORG">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
       <index name="AD_TAB_TABLE" unique="false">
         <index-column name="AD_TABLE_ID"/>
       </index>
@@ -191,12 +191,12 @@
         <unique-column name="AD_WINDOW_ID"/>
         <unique-column name="NAME"/>
       </unique>
-      <check name="ADTAB_HASTREE_CHECK"><![CDATA[HASTREE IN ('Y', 'N')]]></check>
-      <check name="ADTAB_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADTAB_ISINFOTAB_CHECK"><![CDATA[ISINFOTAB IN ('Y', 'N')]]></check>
-      <check name="ADTAB_ISREADONLY_CHECK"><![CDATA[ISREADONLY IN ('Y', 'N')]]></check>
-      <check name="ADTAB_ISSINGLEROW_CHECK"><![CDATA[ISSINGLEROW IN ('Y', 'N')]]></check>
-      <check name="ADTAB_ISTRANSLATIONTAB_CHECK"><![CDATA[ISTRANSLATIONTAB IN ('Y', 'N')]]></check>
-      <check name="ADTAB_NAME_CHECK"><![CDATA[INSTR(NAME, TO_CHAR('_')) = 0]]></check>
+      <check name="AD_TAB_HASTREE_CHK"><![CDATA[HASTREE IN ('Y', 'N')]]></check>
+      <check name="AD_TAB_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_TAB_ISINFOTAB_CHK"><![CDATA[ISINFOTAB IN ('Y', 'N')]]></check>
+      <check name="AD_TAB_ISREADONLY_CHK"><![CDATA[ISREADONLY IN ('Y', 'N')]]></check>
+      <check name="AD_TAB_ISSINGLEROW_CHK"><![CDATA[ISSINGLEROW IN ('Y', 'N')]]></check>
+      <check name="AD_TAB_ISTRANSLATIONTAB_CHK"><![CDATA[ISTRANSLATIONTAB IN ('Y', 'N')]]></check>
+      <check name="AD_TAB_NAME_CHK"><![CDATA[INSTR(NAME, TO_CHAR('_')) = 0]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_TABLE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_TABLE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -123,35 +123,35 @@
       <foreign-key foreignTable="AD_PACKAGE" name="AD_PACKAGE_TABLE">
         <reference local="AD_PACKAGE_ID" foreign="AD_PACKAGE_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="AD_TABLE_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="AD_TABLE_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_WINDOW" name="AD_TABLE_AD_WINDOW">
         <reference local="PO_WINDOW_ID" foreign="AD_WINDOW_ID"/>
       </foreign-key>
       <foreign-key foreignTable="AD_WINDOW" name="AD_WINDOW_TABLE" onDelete="setnull">
         <reference local="AD_WINDOW_ID" foreign="AD_WINDOW_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="TABLECLIENT">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="TABLEORG">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
-      <index name="FKI_AD_PACKAGE_KEY" unique="false">
+      <index name="AD_TABLE_PACKAGE_IDX" unique="false">
         <index-column name="AD_PACKAGE_ID"/>
       </index>
+      <unique name="AD_TABLE_CLASSNAME_PACKAGE_UN">
+        <unique-column name="CLASSNAME"/>
+        <unique-column name="AD_PACKAGE_ID"/>
+      </unique>
       <unique name="AD_TABLE_NAME">
         <unique-column name="NAME"/>
       </unique>
-      <unique name="CLASSNAME_PACKAGE">
-        <unique-column name="CLASSNAME"/>
-        <unique-column name="AD_PACKAGE_ID"/>
-      </unique>
-      <unique name="TREETYPE">
+      <unique name="AD_TABLE_TREETYPE_UN">
         <unique-column name="TREETYPE"/>
       </unique>
-      <check name="ADTABLE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADTABLE_ISDELETEABLE_CHECK"><![CDATA[ISDELETEABLE IN ('Y', 'N')]]></check>
-      <check name="ADTABLE_ISHIGHVOLUME_CHECK"><![CDATA[ISHIGHVOLUME IN ('Y', 'N')]]></check>
-      <check name="ADTABLE_ISSECUR_YENABLED_CHECK"><![CDATA[ISSECURITYENABLED IN ('Y', 'N')]]></check>
-      <check name="ADTABLE_ISVIEW_CHECK"><![CDATA[ISVIEW IN ('Y', 'N')]]></check>
+      <check name="AD_TABLE_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_TABLE_ISDELETEABLE_CHK"><![CDATA[ISDELETEABLE IN ('Y', 'N')]]></check>
+      <check name="AD_TABLE_ISHIGHVOLUME_CHK"><![CDATA[ISHIGHVOLUME IN ('Y', 'N')]]></check>
+      <check name="AD_TABLE_ISSECUR_YENABLED_CHK"><![CDATA[ISSECURITYENABLED IN ('Y', 'N')]]></check>
+      <check name="AD_TABLE_ISVIEW_CHK"><![CDATA[ISVIEW IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_TABLE_ACCESS.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_TABLE_ACCESS.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -55,13 +55,13 @@
       <foreign-key foreignTable="AD_ORG" name="AD_DATAACCESSORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ROLE" name="ADROLE_ADTABLEACCESS" onDelete="cascade">
+      <foreign-key foreignTable="AD_ROLE" name="AD_TABLE_ACCESS_AD_ROLE" onDelete="cascade">
         <reference local="AD_ROLE_ID" foreign="AD_ROLE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_TABLE" name="ADTABLE_ADTABLEACCESS" onDelete="cascade">
+      <foreign-key foreignTable="AD_TABLE" name="AD_TABLE_ACCESS_AD_TABLE" onDelete="cascade">
         <reference local="AD_TABLE_ID" foreign="AD_TABLE_ID"/>
       </foreign-key>
-      <unique name="ADTABLEACCESS_ADROLEID_ADTA_UN">
+      <unique name="AD_TABLE_ACCESS_ROLE_TABLE_UN">
         <unique-column name="AD_ROLE_ID"/>
         <unique-column name="AD_TABLE_ID"/>
       </unique>
--- a/src-db/database/model/tables/AD_TAB_TRL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_TAB_TRL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -64,20 +64,20 @@
       <foreign-key foreignTable="AD_LANGUAGE" name="AD_LANGUAGE_TABTRL">
         <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="AD_TAB_TRL_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="AD_TAB_TRL_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_TAB" name="AD_TABTRL" onDelete="cascade">
         <reference local="AD_TAB_ID" foreign="AD_TAB_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADTABTRL">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADTABTRL">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
-      <unique name="ADTABTRL_ADTABID_ADLANGUAGE_UN">
+      <unique name="AD_TAB_TRL_TAB_LANGUAGE_UN">
         <unique-column name="AD_TAB_ID"/>
         <unique-column name="AD_LANGUAGE"/>
       </unique>
-      <check name="ADTABTRL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADTABTRL_ISTRANSLATED_CHECK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
+      <check name="AD_TABTRL_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_TABTRL_ISTRANSLATED_CHK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_TASK.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_TASK.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -57,10 +57,10 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="TASKCLIENT">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_TASK_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="TASKORG">
+      <foreign-key foreignTable="AD_ORG" name="AD_TASK_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
       <unique name="AD_TASK_NAME">
--- a/src-db/database/model/tables/AD_TASK_ACCESS.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_TASK_ACCESS.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -45,23 +45,23 @@
         <default><![CDATA[Y]]></default>
         <onCreateDefault/>
       </column>
+      <foreign-key foreignTable="AD_ROLE" name="AD_TASK_ACCESS_AD_ROLE" onDelete="cascade">
+        <reference local="AD_ROLE_ID" foreign="AD_ROLE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_TASK" name="AD_TASK_ACCESS_AD_TASK" onDelete="cascade">
+        <reference local="AD_TASK_ID" foreign="AD_TASK_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_CLIENT" name="AD_TASKACCESS_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
       <foreign-key foreignTable="AD_ORG" name="AD_TASKACCESS_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ROLE" name="ADROLE_ADTASKACCESS" onDelete="cascade">
-        <reference local="AD_ROLE_ID" foreign="AD_ROLE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_TASK" name="ADTASK_ADTASKACCESS" onDelete="cascade">
-        <reference local="AD_TASK_ID" foreign="AD_TASK_ID"/>
-      </foreign-key>
       <index name="AD_TASK_ACCESS_UN_KEY" unique="true">
         <index-column name="AD_ROLE_ID"/>
         <index-column name="AD_TASK_ID"/>
       </index>
-      <check name="ADTASKACCESS_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADTASKACCESS_ISREADWRITE_CHECK"><![CDATA[ISREADWRITE IN ('Y', 'N')]]></check>
+      <check name="AD_TASK_ACCESS_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_TASK_ACCESS_ISREADWRITE_CHK"><![CDATA[ISREADWRITE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_TASK_TRL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_TASK_TRL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -60,20 +60,20 @@
       <foreign-key foreignTable="AD_LANGUAGE" name="AD_LANGUAGE_TASKTRL">
         <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="AD_TASK_TRL_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="AD_TASK_TRL_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_TASK" name="AD_TASKTRL" onDelete="cascade">
         <reference local="AD_TASK_ID" foreign="AD_TASK_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADTASKTRL">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADTASKTRL">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
-      <unique name="ADTASKTRL_ADTASKID_ADLANGUA_UN">
+      <unique name="AD_TASK_TRL_TASK_LANGUAGE_UN">
         <unique-column name="AD_TASK_ID"/>
         <unique-column name="AD_LANGUAGE"/>
       </unique>
-      <check name="ADTASKTRL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADTASKTRL_ISTRANSLATED_CHECK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
+      <check name="AD_TASK_TRL_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_TASK_TRL_ISTRANSLATED_CHK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_TEST.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_TEST.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -109,37 +109,37 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_TEST">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="AD_TEST_ACCOUNT_ACCT">
+        <reference local="ACCOUNT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="AD_TEST_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_TEST">
+      <foreign-key foreignTable="AD_ORG" name="AD_TEST_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BPARTNER" name="CBPARTNER_TEST">
+      <foreign-key foreignTable="C_BPARTNER" name="AD_TEST_C_BPARTNER">
         <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_CURRENCY" name="CCURRENCY_TEST">
+      <foreign-key foreignTable="C_CURRENCY" name="AD_TEST_C_CURRENCY">
         <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_DEBT_PAYMENT" name="CDEBT_PAYMENT_TEST">
+      <foreign-key foreignTable="C_DEBT_PAYMENT" name="AD_TEST_C_DEBT_PAYMENT">
         <reference local="C_DEBT_PAYMENT_ID" foreign="C_DEBT_PAYMENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_LOCATION" name="CLOCATION_TEST">
+      <foreign-key foreignTable="C_LOCATION" name="AD_TEST_C_LOCATION">
         <reference local="C_LOCATION_ID" foreign="C_LOCATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_UOM" name="CUOM_TEST">
+      <foreign-key foreignTable="C_UOM" name="AD_TEST_C_UOM">
         <reference local="C_UOM_ID" foreign="C_UOM_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="M_LOCATOR" name="MLOCATOR_TEST">
+      <foreign-key foreignTable="M_LOCATOR" name="AD_TEST_M_LOCATOR">
         <reference local="M_LOCATOR_ID" foreign="M_LOCATOR_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="M_PRODUCT" name="MPRODUCT_TEST">
+      <foreign-key foreignTable="M_PRODUCT" name="AD_TEST_M_PRODUCT">
         <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_ACCOUNT_TEST">
-        <reference local="ACCOUNT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <check name="TEST_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="TEST_PROCESSED_CHECK"><![CDATA[PROCESSED IN ('Y', 'N')]]></check>
+      <check name="AD_TEST_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_TEST_PROCESSED_CHK"><![CDATA[PROCESSED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_TEXTINTERFACES.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_TEXTINTERFACES.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,13 +49,13 @@
         <default><![CDATA[0]]></default>
         <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">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_TEXTINTERFACES_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_MODULE" name="ADMODULE_ADTEXTINTERFACES">
+      <foreign-key foreignTable="AD_MODULE" name="AD_TEXTINTERFACES_AD_MODULE">
         <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADTEXTINTERFACES">
+      <foreign-key foreignTable="AD_ORG" name="AD_TEXTINTERFACES_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
       <index name="AD_TEXTINTERF_FILENAME_TEXT" unique="false">
--- a/src-db/database/model/tables/AD_TEXTINTERFACES_TRL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_TEXTINTERFACES_TRL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -52,20 +52,20 @@
       <foreign-key foreignTable="AD_LANGUAGE" name="AD_LANGUAGE_TEXTINTERFACESTRL">
         <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="AD_TEXTINTERFACES_TRL_AD_CLIEN">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="AD_TEXTINTERFACES_TRL_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_TEXTINTERFACES" name="AD_TEXTINTERFACESTRL" onDelete="cascade">
         <reference local="AD_TEXTINTERFACES_ID" foreign="AD_TEXTINTERFACES_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADTEXTINTERFACESTRL">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADTEXTINTERFACESTRL">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
       <index name="AD_TEXTINTERFACES_TRL_UN_KEY" unique="true">
         <index-column name="AD_LANGUAGE"/>
         <index-column name="AD_TEXTINTERFACES_ID"/>
       </index>
-      <check name="ADTEXTTRL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADTEXTTRL_ISTRANSLATED_CHECK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
+      <check name="AD_TEXTINTERFACES_TRL_ISAC_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_TEXTINTERFACES_TRL_ISTR_CHK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_TREE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_TREE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,17 +49,17 @@
         <default><![CDATA[Y]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADTREE">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_TREE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADTREE">
+      <foreign-key foreignTable="AD_ORG" name="AD_TREE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
       <unique name="AD_TREE_NAME">
         <unique-column name="AD_CLIENT_ID"/>
         <unique-column name="NAME"/>
       </unique>
-      <check name="ADTREE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADTREE_ISALLNODES_CHECK"><![CDATA[ISALLNODES IN ('Y', 'N')]]></check>
+      <check name="AD_TREE_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_TREE_ISALLNODES_CHK"><![CDATA[ISALLNODES IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_TREEBAR.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_TREEBAR.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -45,19 +45,19 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADTREEBAR">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_TREEBAR_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADTREEBAR">
+      <foreign-key foreignTable="AD_ORG" name="AD_TREEBAR_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_TREE" name="ADTREE_ADTREEBAR" onDelete="cascade">
+      <foreign-key foreignTable="AD_TREE" name="AD_TREEBAR_AD_TREE" onDelete="cascade">
         <reference local="AD_TREE_ID" foreign="AD_TREE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_USER" name="ADUSER_ADTREEBAR" onDelete="cascade">
+      <foreign-key foreignTable="AD_USER" name="AD_TREEBAR_AD_USER" onDelete="cascade">
         <reference local="AD_USER_ID" foreign="AD_USER_ID"/>
       </foreign-key>
-      <unique name="ADTREEBAR_ADTREEID_ADUSERID_UN">
+      <unique name="AD_TREEBAR_TREE_USER_NODE_UN">
         <unique-column name="AD_TREE_ID"/>
         <unique-column name="AD_USER_ID"/>
         <unique-column name="NODE_ID"/>
--- a/src-db/database/model/tables/AD_TREENODE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_TREENODE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,19 +49,19 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADTREENODE">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_TREENODE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADTREENODE" onDelete="cascade">
+      <foreign-key foreignTable="AD_ORG" name="AD_TREENODE_AD_ORG" onDelete="cascade">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_TREE" name="ADTREE_ADTREENODE" onDelete="cascade">
+      <foreign-key foreignTable="AD_TREE" name="AD_TREENODE_AD_TREE" onDelete="cascade">
         <reference local="AD_TREE_ID" foreign="AD_TREE_ID"/>
       </foreign-key>
       <index name="AD_TREENODE_PARENTID" unique="false">
         <index-column name="PARENT_ID"/>
       </index>
-      <unique name="ADTREENODE_ADTREEID_NODEID_UN">
+      <unique name="AD_TREENODE_TREE_NODE_UN">
         <unique-column name="AD_TREE_ID"/>
         <unique-column name="NODE_ID"/>
       </unique>
--- a/src-db/database/model/tables/AD_TREENODEBP.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_TREENODEBP.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,19 +49,19 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADTREENODEBP">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_TREENODEBP_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADTREENODEBP">
+      <foreign-key foreignTable="AD_ORG" name="AD_TREENODEBP_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_TREE" name="ADTREE_ADTREENODEBP" onDelete="cascade">
+      <foreign-key foreignTable="AD_TREE" name="AD_TREENODEBP_AD_TREE" onDelete="cascade">
         <reference local="AD_TREE_ID" foreign="AD_TREE_ID"/>
       </foreign-key>
       <index name="AD_TREENODEBP_PARENT" unique="false">
         <index-column name="PARENT_ID"/>
       </index>
-      <unique name="ADTREENODEBP_ADTREEID_NODEI_UN">
+      <unique name="AD_TREENODEBP_TREE_NODE_UN">
         <unique-column name="AD_TREE_ID"/>
         <unique-column name="NODE_ID"/>
       </unique>
--- a/src-db/database/model/tables/AD_TREENODEMM.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_TREENODEMM.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,19 +49,19 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADTREENODEMM">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_TREENODEMM_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADTREENODEMM">
+      <foreign-key foreignTable="AD_ORG" name="AD_TREENODEMM_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_TREE" name="ADTREE_ADTREENODEMM" onDelete="cascade">
+      <foreign-key foreignTable="AD_TREE" name="AD_TREENODEMM_AD_TREE" onDelete="cascade">
         <reference local="AD_TREE_ID" foreign="AD_TREE_ID"/>
       </foreign-key>
       <index name="AD_TREENODEMM_PARENT" unique="false">
         <index-column name="PARENT_ID"/>
       </index>
-      <unique name="ADTREENODEMM_ADTREEID_NODEI_UN">
+      <unique name="AD_TREENODEMM_TREE_NODE_UN">
         <unique-column name="AD_TREE_ID"/>
         <unique-column name="NODE_ID"/>
       </unique>
--- a/src-db/database/model/tables/AD_TREENODEPR.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_TREENODEPR.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,19 +49,19 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADTREENODEPR">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_TREENODEPR_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADTREENODEPR">
+      <foreign-key foreignTable="AD_ORG" name="AD_TREENODEPR_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_TREE" name="ADTREE_ADTREENODEPR" onDelete="cascade">
+      <foreign-key foreignTable="AD_TREE" name="AD_TREENODEPR_AD_TREE" onDelete="cascade">
         <reference local="AD_TREE_ID" foreign="AD_TREE_ID"/>
       </foreign-key>
       <index name="AD_TREENODEPR_PARENT" unique="false">
         <index-column name="PARENT_ID"/>
       </index>
-      <unique name="ADTREENODEPR_ADTREEID_NODEI_UN">
+      <unique name="AD_TREENODEPR_TREE_NODE_UN">
         <unique-column name="AD_TREE_ID"/>
         <unique-column name="NODE_ID"/>
       </unique>
--- a/src-db/database/model/tables/AD_USER.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_USER.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -145,42 +145,42 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <foreign-key foreignTable="AD_ORG" name="AD_USER_AD_ORGTRX">
+        <reference local="AD_ORGTRX_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_BPARTNER" name="AD_USER_C_BPARTNER">
+        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_BPARTNER_LOCATION" name="AD_USER_C_BPARTNER_LOCATION">
+        <reference local="C_BPARTNER_LOCATION_ID" foreign="C_BPARTNER_LOCATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_GREETING" name="AD_USER_C_GREETING">
+        <reference local="C_GREETING_ID" foreign="C_GREETING_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_CLIENT" name="AD_USER_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="AD_USER_DEFAULT_AD_CLIENT">
+        <reference local="DEFAULT_AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_LANGUAGE" name="AD_USER_DEFAULT_AD_LANGUAGE">
+        <reference local="DEFAULT_AD_LANGUAGE" foreign="AD_LANGUAGE"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="AD_USER_DEFAULT_AD_ORG">
+        <reference local="DEFAULT_AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ROLE" name="AD_USER_DEFAULT_AD_ROLE">
+        <reference local="DEFAULT_AD_ROLE_ID" foreign="AD_ROLE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="M_WAREHOUSE" name="AD_USER_DEFAULT_M_WAREHOUSE">
+        <reference local="DEFAULT_M_WAREHOUSE_ID" foreign="M_WAREHOUSE_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_ORG" name="AD_USER_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADUSERDEFAULT">
-        <reference local="DEFAULT_AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_LANGUAGE" name="ADLANGUAGE_ADUSERDEFAULT">
-        <reference local="DEFAULT_AD_LANGUAGE" foreign="AD_LANGUAGE"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADUSERDEFAULT">
-        <reference local="DEFAULT_AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORGTRX_ADUSER">
-        <reference local="AD_ORGTRX_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ROLE" name="ADROLE_ADUSERDEFAULT">
-        <reference local="DEFAULT_AD_ROLE_ID" foreign="AD_ROLE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_USER" name="ADUSER_SUPERVISOR">
+      <foreign-key foreignTable="AD_USER" name="AD_USER_SUPERVISOR">
         <reference local="SUPERVISOR_ID" foreign="AD_USER_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BPARTNER" name="CBPARTNER_ADUSER">
-        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_BPARTNER_LOCATION" name="CBPLOCATION_ADUSER">
-        <reference local="C_BPARTNER_LOCATION_ID" foreign="C_BPARTNER_LOCATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_GREETING" name="CGREETING_ADUSER">
-        <reference local="C_GREETING_ID" foreign="C_GREETING_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="M_WAREHOUSE" name="MWAREHOUSE_ADUSERDEFAULT">
-        <reference local="DEFAULT_M_WAREHOUSE_ID" foreign="M_WAREHOUSE_ID"/>
-      </foreign-key>
       <index name="AD_USER_EMAIL" unique="false">
         <index-column name="EMAIL"/>
       </index>
--- a/src-db/database/model/tables/AD_USER_ROLES.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_USER_ROLES.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -41,19 +41,19 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <foreign-key foreignTable="AD_ROLE" name="AD_USER_ROLES_AD_ROLE" onDelete="cascade">
+        <reference local="AD_ROLE_ID" foreign="AD_ROLE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_USER" name="AD_USER_ROLES_AD_USER" onDelete="cascade">
+        <reference local="AD_USER_ID" foreign="AD_USER_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_CLIENT" name="AD_USERROLESCLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
       <foreign-key foreignTable="AD_ORG" name="AD_USERROLESORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ROLE" name="ADROLE_ADUSERROLES" onDelete="cascade">
-        <reference local="AD_ROLE_ID" foreign="AD_ROLE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_USER" name="ADUSER_USERROLES" onDelete="cascade">
-        <reference local="AD_USER_ID" foreign="AD_USER_ID"/>
-      </foreign-key>
-      <unique name="ADUSERROLES_ADUSERID_ADROLE_UN">
+      <unique name="AD_USER_ROLES_USER_ROLE_UN">
         <unique-column name="AD_USER_ID"/>
         <unique-column name="AD_ROLE_ID"/>
       </unique>
--- a/src-db/database/model/tables/AD_VAL_RULE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_VAL_RULE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -53,13 +53,13 @@
         <default><![CDATA[0]]></default>
         <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">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_VAL_RULE_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_MODULE" name="AD_VAL_RULE_AD_MODULE">
         <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="VAL_RULECLIENT">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="VAL_RULEORG">
+      <foreign-key foreignTable="AD_ORG" name="AD_VAL_RULE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
       <check name="AD_VAL_RULE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
--- a/src-db/database/model/tables/AD_WF_NODE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_WF_NODE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -85,34 +85,34 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_FORM" name="ADFORM_ADWFNODE">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_WF_NODE_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_FORM" name="AD_WF_NODE_AD_FORM">
         <reference local="AD_FORM_ID" foreign="AD_FORM_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_PROCESS" name="ADPROCESS_ADWFNODE">
+      <foreign-key foreignTable="AD_ORG" name="AD_WF_NODE_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_PROCESS" name="AD_WF_NODE_AD_PROCESS">
         <reference local="AD_PROCESS_ID" foreign="AD_PROCESS_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_TASK" name="ADTASK_ADWFNODE">
+      <foreign-key foreignTable="AD_TASK" name="AD_WF_NODE_AD_TASK">
         <reference local="AD_TASK_ID" foreign="AD_TASK_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_WINDOW" name="ADWINDOW_ADWFNODE">
+      <foreign-key foreignTable="AD_WINDOW" name="AD_WF_NODE_AD_WINDOW">
         <reference local="AD_WINDOW_ID" foreign="AD_WINDOW_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_WORKFLOW" name="ADWORKFLOW_ADWFNODE" onDelete="cascade">
+      <foreign-key foreignTable="AD_WORKFLOW" name="AD_WF_NODE_AD_WORKFLOW" onDelete="cascade">
         <reference local="AD_WORKFLOW_ID" foreign="AD_WORKFLOW_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_WORKFLOW" name="ADWORKFLOW_ADWFNODEACTION">
+      <foreign-key foreignTable="AD_WORKFLOW" name="AD_WF_NODE_WORKFLOW">
         <reference local="WORKFLOW_ID" foreign="AD_WORKFLOW_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="WF_NODECLIENT">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="WF_NODEORG">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
       <index name="AD_WF_NODE_WORKFLOW" unique="false">
         <index-column name="AD_WORKFLOW_ID"/>
       </index>
-      <check name="ADWFNODE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADWFNODE_ISCENTMAINT_CHECK"><![CDATA[ISCENTRALLYMAINTAINED IN ('Y', 'N')]]></check>
+      <check name="AD_WF_NODE_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_WF_NODE_ISCENTRALLYMAIN_CHK"><![CDATA[ISCENTRALLYMAINTAINED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_WF_NODENEXT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_WF_NODENEXT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -45,22 +45,22 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <foreign-key foreignTable="AD_CLIENT" name="AD_WF_NODENEXT_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="AD_WF_NODENEXT_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_WF_NODE" name="AD_WFID_NEXT" onDelete="cascade">
         <reference local="AD_WF_NEXT_ID" foreign="AD_WF_NODE_ID"/>
       </foreign-key>
       <foreign-key foreignTable="AD_WF_NODE" name="AD_WFID_NODENEXT" onDelete="cascade">
         <reference local="AD_WF_NODE_ID" foreign="AD_WF_NODE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="WF_NODENEXTCLIENT">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="WF_NODENEXTORG">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
-      <unique name="ADWFNODENEXT_ADWFNODEID_ADW_UN">
+      <unique name="AD_WF_NODENEXT_WF_NODE_WF_N_UN">
         <unique-column name="AD_WF_NODE_ID"/>
         <unique-column name="AD_WF_NEXT_ID"/>
       </unique>
-      <check name="ADWFNODENEXT_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_WF_NODENEXT_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_WF_NODE_TRL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_WF_NODE_TRL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -60,20 +60,20 @@
       <foreign-key foreignTable="AD_LANGUAGE" name="AD_LANGUAGE_WFNODETRL">
         <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="AD_WF_NODE_TRL_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="AD_WF_NODE_TRL_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_WF_NODE" name="AD_WFNODETRL" onDelete="cascade">
         <reference local="AD_WF_NODE_ID" foreign="AD_WF_NODE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADWFNODETRL">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADWFNODETRL">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
       <index name="AD_WF_NODE_TRL_UN_KEY" unique="true">
         <index-column name="AD_WF_NODE_ID"/>
         <index-column name="AD_LANGUAGE"/>
       </index>
-      <check name="ADWFNODETRL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADWFNODETRL_ISTRANSLATED_CHECK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
+      <check name="AD_WF_NODE_TRL_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_WF_NODE_TRL_ISTRANSLATE_CHK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_WINDOW.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_WINDOW.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -69,16 +69,16 @@
         <default><![CDATA[0]]></default>
         <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">
+      <foreign-key foreignTable="AD_CLIENT" name="AD_WINDOW_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_IMAGE" name="AD_WINDOW_AD_IMAGE">
         <reference local="AD_IMAGE_ID" foreign="AD_IMAGE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_MODULE" name="ADMODULE_ADWINDOW">
+      <foreign-key foreignTable="AD_MODULE" name="AD_WINDOW_AD_MODULE">
         <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="WINDOWCLIENT">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="WINDOWORG">
+      <foreign-key foreignTable="AD_ORG" name="AD_WINDOW_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
       <unique name="AD_WINDOW_NAME">
@@ -86,8 +86,8 @@
         <unique-column name="NAME"/>
         <unique-column name="AD_MODULE_ID"/>
       </unique>
+      <check name="AD_WINDOW_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_WINDOW_ISSOTRX_CHK"><![CDATA[ISSOTRX IN ('Y', 'N')]]></check>
       <check name="AD_WINDOW_NAME_CHECK"><![CDATA[(INSTR(NAME, (CHR(39))) = 0) AND (INSTR(NAME, TO_CHAR('_')) = 0)]]></check>
-      <check name="ADWINDOW_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADWINDOW_ISSOTRX_CHECK"><![CDATA[ISSOTRX IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_WINDOW_ACCESS.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_WINDOW_ACCESS.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -51,17 +51,17 @@
       <foreign-key foreignTable="AD_ORG" name="AD_FUNCTACCESSORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ROLE" name="ADROLE_ADWINDOWACCESS" onDelete="cascade">
+      <foreign-key foreignTable="AD_ROLE" name="AD_WINDOW_ACCESS_AD_ROLE" onDelete="cascade">
         <reference local="AD_ROLE_ID" foreign="AD_ROLE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_WINDOW" name="ADWINDOW_ADWINDOWACCESS" onDelete="cascade">
+      <foreign-key foreignTable="AD_WINDOW" name="AD_WINDOW_ACCESS_AD_WINDOW" onDelete="cascade">
         <reference local="AD_WINDOW_ID" foreign="AD_WINDOW_ID"/>
       </foreign-key>
       <index name="AD_WINDOW_ACCESS_UN_KEY" unique="true">
         <index-column name="AD_ROLE_ID"/>
         <index-column name="AD_WINDOW_ID"/>
       </index>
-      <check name="ADWINDOWACCESS_EADWRITE_CHECK"><![CDATA[ISREADWRITE IN ('Y', 'N')]]></check>
-      <check name="ADWINDOWACCESS_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_WINDOW_ACCESS_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_WINDOW_ACCESS_ISREADWRI_CHK"><![CDATA[ISREADWRITE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_WINDOW_TRL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_WINDOW_TRL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -60,20 +60,20 @@
       <foreign-key foreignTable="AD_LANGUAGE" name="AD_LANGUAGE_WINDOWTRL">
         <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="AD_WINDOW_TRL_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="AD_WINDOW_TRL_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_WINDOW" name="AD_WINDOWTRL" onDelete="cascade">
         <reference local="AD_WINDOW_ID" foreign="AD_WINDOW_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADWINDOWTRL">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADWINDOWTRL">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
-      <unique name="ADWINDOWTRL_ADWINDOWID_ADLA_UN">
+      <unique name="AD_WINDOW_TRL_WINDOW_LANGUA_UN">
         <unique-column name="AD_WINDOW_ID"/>
         <unique-column name="AD_LANGUAGE"/>
       </unique>
-      <check name="ADWINDOWTRL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADWINDOWTRL_ISTRANSLATED_CHECK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
+      <check name="AD_WINDOW_TRL_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_WINDOW_TRL_ISTRANSLATED_CHK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_WORKFLOW.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_WORKFLOW.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -57,17 +57,17 @@
         <default><![CDATA[0]]></default>
         <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"/>
+      <foreign-key foreignTable="AD_CLIENT" name="AD_WORKFLOW_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_MODULE" name="ADWORKFLOW_ADMODULE">
+      <foreign-key foreignTable="AD_MODULE" name="AD_WORKFLOW_AD_MODULE">
         <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="WORKFLOWCLIENT">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      <foreign-key foreignTable="AD_ORG" name="AD_WORKFLOW_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="WORKFLOWORG">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      <foreign-key foreignTable="AD_WF_NODE" name="AD_WORKFLOW_AD_WF_NODE">
+        <reference local="AD_WF_NODE_ID" foreign="AD_WF_NODE_ID"/>
       </foreign-key>
       <unique name="AD_WORKFLOW_NAME">
         <unique-column name="AD_CLIENT_ID"/>
--- a/src-db/database/model/tables/AD_WORKFLOW_ACCESS.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_WORKFLOW_ACCESS.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -45,23 +45,23 @@
         <default><![CDATA[Y]]></default>
         <onCreateDefault/>
       </column>
+      <foreign-key foreignTable="AD_ROLE" name="AD_WORKFLOW_ACCESS_AD_ROLE" onDelete="cascade">
+        <reference local="AD_ROLE_ID" foreign="AD_ROLE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_WORKFLOW" name="AD_WORKFLOW_ACCESS_AD_WORKFLOW" onDelete="cascade">
+        <reference local="AD_WORKFLOW_ID" foreign="AD_WORKFLOW_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_CLIENT" name="AD_WORKFLOWACCESS_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
       <foreign-key foreignTable="AD_ORG" name="AD_WORKFLOWACCESS_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ROLE" name="ADROLE_ADWORKFLOWACCESS" onDelete="cascade">
-        <reference local="AD_ROLE_ID" foreign="AD_ROLE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_WORKFLOW" name="ADWORKFOW_WORKFLOWACCESS" onDelete="cascade">
-        <reference local="AD_WORKFLOW_ID" foreign="AD_WORKFLOW_ID"/>
-      </foreign-key>
       <index name="AD_WORKFLOW_ACCESS_UN_KEY" unique="true">
         <index-column name="AD_ROLE_ID"/>
         <index-column name="AD_WORKFLOW_ID"/>
       </index>
-      <check name="ADWORKFLOWAC_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADWORKFLOWAC_ISREADWRITE_CHECK"><![CDATA[ISREADWRITE IN ('Y', 'N')]]></check>
+      <check name="AD_WORKFLOW_ACCESS_ISACTIV_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_WORKFLOW_ACCESS_ISREADW_CHK"><![CDATA[ISREADWRITE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AD_WORKFLOW_TRL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AD_WORKFLOW_TRL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -60,20 +60,20 @@
       <foreign-key foreignTable="AD_LANGUAGE" name="AD_LANGUAGE_WORKFLOWTRL">
         <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="AD_WORKFLOW_TRL_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="AD_WORKFLOW_TRL_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_WORKFLOW" name="AD_WORKFLOWTRL" onDelete="cascade">
         <reference local="AD_WORKFLOW_ID" foreign="AD_WORKFLOW_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADWORKFLOWTRL">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ADWORKFLOWTRL">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
-      <unique name="ADWORKFLOWTRL_ADWORKFLOWID__UN">
+      <unique name="AD_WORKFLOW_TRL_WORKFLOW_LA_UN">
         <unique-column name="AD_WORKFLOW_ID"/>
         <unique-column name="AD_LANGUAGE"/>
       </unique>
-      <check name="ADWORKFLOWTRL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADWORKFLOWTRL_ISTRANS_CHECK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
+      <check name="AD_WORKFLOW_TRL_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_WORKFLOW_TRL_ISTRANSLAT_CHK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AT_COMMAND.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AT_COMMAND.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -88,15 +88,15 @@
       <foreign-key foreignTable="AD_ORG" name="AD_ORG_ATCOMMAND">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ATCOMMAND">
+      <foreign-key foreignTable="AD_CLIENT" name="AT_COMMAND_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <check name="ATCOMMAND_HASPREFIX_CHECK"><![CDATA[HAS_PREFIX IN ('Y', 'N')]]></check>
-      <check name="ATCOMMAND_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ATCOMMAND_REMFRAME_CHECK"><![CDATA[REMEMBER_FRAME IN ('Y', 'N')]]></check>
-      <check name="ATCOMMAND_REMTAB_CHECK"><![CDATA[REMEMBER_TAB IN ('Y', 'N')]]></check>
-      <check name="ATCOMMAND_REMWINDOW_CHECK"><![CDATA[REMEMBER_WINDOW IN ('Y', 'N')]]></check>
-      <check name="ATCOMMAND_WRITEABLE_CHECK"><![CDATA[CHECK_WRITEABLE IN ('Y', 'N')]]></check>
-      <check name="ATCOMMANDLINEINTERCH_CHECK"><![CDATA[LINE_INTERCHANGE IN ('Y', 'N')]]></check>
+      <check name="AT_COMMAND_CHECK_WRITEABLE_CHK"><![CDATA[CHECK_WRITEABLE IN ('Y', 'N')]]></check>
+      <check name="AT_COMMAND_HAS_PREFIX_CHK"><![CDATA[HAS_PREFIX IN ('Y', 'N')]]></check>
+      <check name="AT_COMMAND_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AT_COMMAND_LINE_INTERCHANG_CHK"><![CDATA[LINE_INTERCHANGE IN ('Y', 'N')]]></check>
+      <check name="AT_COMMAND_REMEMBER_FRAME_CHK"><![CDATA[REMEMBER_FRAME IN ('Y', 'N')]]></check>
+      <check name="AT_COMMAND_REMEMBER_TAB_CHK"><![CDATA[REMEMBER_TAB IN ('Y', 'N')]]></check>
+      <check name="AT_COMMAND_REMEMBER_WINDOW_CHK"><![CDATA[REMEMBER_WINDOW IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AT_COMMAND_TRL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AT_COMMAND_TRL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -68,20 +68,20 @@
       <foreign-key foreignTable="AD_LANGUAGE" name="AD_LANGUAGE_ATCOMMAND">
         <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ATCOMMANDTRL">
+      <foreign-key foreignTable="AD_CLIENT" name="AT_COMMAND_TRL_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_ATCOMMANDTRL">
+      <foreign-key foreignTable="AD_ORG" name="AT_COMMAND_TRL_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
       <foreign-key foreignTable="AT_COMMAND" name="AT_COMMANDTRL" onDelete="cascade">
         <reference local="AT_COMMAND_ID" foreign="AT_COMMAND_ID"/>
       </foreign-key>
-      <unique name="ATCOMMANDTRL_ATCOMMANDID_AD_UN">
+      <unique name="AT_COMMAND_TRL_COMMAND_LANG_UN">
         <unique-column name="AT_COMMAND_ID"/>
         <unique-column name="AD_LANGUAGE"/>
       </unique>
-      <check name="ATCOMMANDTRL_IS_ANSLATED_CHECK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
-      <check name="ATCOMMANDTRL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AT_COMMAND_TRL_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AT_COMMAND_TRL_ISTRANSLATE_CHK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AT_LINE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AT_LINE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -84,18 +84,18 @@
       <foreign-key foreignTable="AD_ORG" name="AD_ORG_ATLINE">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ATLINE">
+      <foreign-key foreignTable="AT_COMMAND" name="AT_COMMAND_ATLINE">
+        <reference local="AT_COMMAND_ID" foreign="AT_COMMAND_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="AT_LINE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AT_COMMAND" name="AT_COMMAND_ATLINE">
-        <reference local="AT_COMMAND_ID" foreign="AT_COMMAND_ID"/>
+      <foreign-key foreignTable="AT_TEST" name="AT_LINE_CHILD_TEST">
+        <reference local="CHILD_TEST" foreign="AT_TEST_ID"/>
       </foreign-key>
       <foreign-key foreignTable="AT_TEST" name="AT_TEST_ATLINE">
         <reference local="AT_TEST_ID" foreign="AT_TEST_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AT_TEST" name="CHILD_TEST_ATLINE">
-        <reference local="CHILD_TEST" foreign="AT_TEST_ID"/>
-      </foreign-key>
       <check name="AT_LINE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AT_TEST.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AT_TEST.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -80,10 +80,10 @@
       <foreign-key foreignTable="AD_ORG" name="AD_ORG_ATTEST">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ATTEST">
+      <foreign-key foreignTable="AD_CLIENT" name="AT_TEST_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AT_ROLLOGIN" name="ATROLLOGIN_ATTEST">
+      <foreign-key foreignTable="AT_ROLLOGIN" name="AT_TEST_AT_ROLLOGIN">
         <reference local="AT_ROLLOGIN_ID" foreign="AT_ROLLOGIN_ID"/>
       </foreign-key>
       <check name="AT_TEST_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
--- a/src-db/database/model/tables/AT_TESTDOCUMENT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AT_TESTDOCUMENT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -95,12 +95,12 @@
       <foreign-key foreignTable="AD_ORG" name="AD_ORG_ATTESTDOCUMENT">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ATTESTDOCUMENT">
+      <foreign-key foreignTable="AD_CLIENT" name="AT_TESTDOCUMENT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <check name="ATTESTDOCUMENT_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ATTESTDOCUMENT_LINEINTER_CHECK"><![CDATA[LINE_INTERCHANGER IN ('Y', 'N')]]></check>
-      <check name="ATTESTDOCUMENT_ODUCTION_CHECK"><![CDATA[INTRODUCTION IN ('Y', 'N')]]></check>
-      <check name="ATTESTDOCUMENT_PREFIX_CHECK"><![CDATA[PREFIX IN ('Y', 'N')]]></check>
+      <check name="AT_TESTDOCUMENT_INTRODUCTI_CHK"><![CDATA[INTRODUCTION IN ('Y', 'N')]]></check>
+      <check name="AT_TESTDOCUMENT_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AT_TESTDOCUMENT_LINE_INTER_CHK"><![CDATA[LINE_INTERCHANGER IN ('Y', 'N')]]></check>
+      <check name="AT_TESTDOCUMENT_PREFIX_CHK"><![CDATA[PREFIX IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/AT_TESTDOCUMENTLINE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/AT_TESTDOCUMENTLINE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -88,13 +88,13 @@
       <foreign-key foreignTable="AD_ORG" name="AD_ORG_ATTESTDOCUMENTLINE">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ATTESTDOCUMENTLINE">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
       <foreign-key foreignTable="AT_COMMAND" name="AT_COMMAND_ATTESTDOCUMENTLINE">
         <reference local="AT_COMMAND_ID" foreign="AT_COMMAND_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AT_TESTDOCUMENT" name="ATTESTDOCUMENT_TESTDOCLINE">
+      <foreign-key foreignTable="AD_CLIENT" name="AT_TESTDOCUMENTLINE_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AT_TESTDOCUMENT" name="AT_TESTDOCUMENTLINE_AT_TESTDOC">
         <reference local="AT_TESTDOCUMENT_ID" foreign="AT_TESTDOCUMENT_ID"/>
       </foreign-key>
       <unique name="AT_TESTDOCUMENTLINE_UNIQUE">
--- a/src-db/database/model/tables/A_AMORTIZATION.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/A_AMORTIZATION.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -105,12 +105,12 @@
       <foreign-key foreignTable="C_CURRENCY" name="A_AMORTIZATIO_CURRENCY">
         <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="A_AMORTIZATION_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_ORG" name="A_AMORTIZATION_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_AAMORTIZATION">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
       <check name="A_AMORTIZATION_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/A_AMORTIZATIONLINE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/A_AMORTIZATIONLINE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -60,18 +60,18 @@
       <foreign-key foreignTable="A_AMORTIZATION" name="A_AMORTIZALINE_AMORTIZA">
         <reference local="A_AMORTIZATION_ID" foreign="A_AMORTIZATION_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="A_ASSET" name="A_AMORTIZATIONLINE_A_ASSET">
+        <reference local="A_ASSET_ID" foreign="A_ASSET_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="A_AMORTIZATIONLINE_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="C_CURRENCY" name="A_AMORTIZATIONLINE_CURRENCY">
         <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
       </foreign-key>
       <foreign-key foreignTable="AD_ORG" name="A_AMORTIZATIONLINE_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="A_ASSET" name="AASSET_AAMORTIZATIONLINE">
-        <reference local="A_ASSET_ID" foreign="A_ASSET_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_AAMORTIZATIONLINE">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
       <check name="A_AMORTIZATIONL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/A_ASSET.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/A_ASSET.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -233,42 +233,42 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <foreign-key foreignTable="A_ASSET_GROUP" name="A_ASSET_A_ASSET_GROUP">
+        <reference local="A_ASSET_GROUP_ID" foreign="A_ASSET_GROUP_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="A_ASSET_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="A_ASSET_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_USER" name="A_ASSET_AD_USER">
+        <reference local="AD_USER_ID" foreign="AD_USER_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="M_ATTRIBUTESETINSTANCE" name="A_ASSET_ATTRIBUTESETINSTANCE">
         <reference local="M_ATTRIBUTESETINSTANCE_ID" foreign="M_ATTRIBUTESETINSTANCE_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="C_BPARTNER" name="A_ASSET_C_BPARTNER">
+        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_BPARTNER_LOCATION" name="A_ASSET_C_BPARTNER_LOCATION">
+        <reference local="C_BPARTNER_LOCATION_ID" foreign="C_BPARTNER_LOCATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_LOCATION" name="A_ASSET_C_LOCATION">
+        <reference local="C_LOCATION_ID" foreign="C_LOCATION_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="C_CURRENCY" name="A_ASSET_CURRENCY">
         <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="A_ASSET_GROUP" name="AASSETGROUP_AASSET">
-        <reference local="A_ASSET_GROUP_ID" foreign="A_ASSET_GROUP_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_AASSET">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_AASSET">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_USER" name="ADUSER_AASSET">
-        <reference local="AD_USER_ID" foreign="AD_USER_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_BPARTNER" name="CBPARTNER_AASSET">
-        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_BPARTNER_LOCATION" name="CBPLOCATION_AASSET">
-        <reference local="C_BPARTNER_LOCATION_ID" foreign="C_BPARTNER_LOCATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_LOCATION" name="CLOCATION_AASSET">
-        <reference local="C_LOCATION_ID" foreign="C_LOCATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="M_LOCATOR" name="MLOCATOR_AASSET">
+      <foreign-key foreignTable="M_LOCATOR" name="A_ASSET_M_LOCATOR">
         <reference local="M_LOCATOR_ID" foreign="M_LOCATOR_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="M_PRODUCT" name="MPRODUCT_AASSET">
+      <foreign-key foreignTable="M_PRODUCT" name="A_ASSET_M_PRODUCT">
         <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
       </foreign-key>
-      <check name="AASSET_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="AASSET_ISDISPOSED_CHECK"><![CDATA[ISDISPOSED IN ('Y', 'N')]]></check>
-      <check name="AASSET_ISINPOSESSION_CHECK"><![CDATA[ISINPOSESSION IN ('Y', 'N')]]></check>
-      <check name="AASSET_ISOWNED_CHECK"><![CDATA[ISOWNED IN ('Y', 'N')]]></check>
+      <check name="A_ASSET_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="A_ASSET_ISDISPOSED_CHK"><![CDATA[ISDISPOSED IN ('Y', 'N')]]></check>
+      <check name="A_ASSET_ISINPOSESSION_CHK"><![CDATA[ISINPOSESSION IN ('Y', 'N')]]></check>
+      <check name="A_ASSET_ISOWNED_CHK"><![CDATA[ISOWNED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/A_ASSET_ACCT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/A_ASSET_ACCT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -57,31 +57,31 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="A_ASSET" name="AASSET_AASSETACCT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="A_ASSET_ACCT_A_ACCUMDEPRECIATI">
+        <reference local="A_ACCUMDEPRECIATION_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="A_ASSET" name="A_ASSET_ACCT_A_ASSET">
         <reference local="A_ASSET_ID" foreign="A_ASSET_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_AASSETACCT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="A_ASSET_ACCT_A_DEPRECIATION_AC">
+        <reference local="A_DEPRECIATION_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="A_ASSET_ACCT_A_DISPOSAL_GAIN">
+        <reference local="A_DISPOSAL_GAIN" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="A_ASSET_ACCT_A_DISPOSAL_LOSS">
+        <reference local="A_DISPOSAL_LOSS" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="A_ASSET_ACCT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_AASSETACCT">
+      <foreign-key foreignTable="AD_ORG" name="A_ASSET_ACCT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ACCTSCHEMA" name="CACCTSCHEMA_AASSETACCT">
+      <foreign-key foreignTable="C_ACCTSCHEMA" name="A_ASSET_ACCT_C_ACCTSCHEMA">
         <reference local="C_ACCTSCHEMA_ID" foreign="C_ACCTSCHEMA_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="CVALIDCOMBINATION_AASSETACCT">
-        <reference local="A_DEPRECIATION_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="CVALIDCOMBINATION_AASSETACCT1">
-        <reference local="A_DISPOSAL_GAIN" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="CVALIDCOMBINATION_AASSETACCT2">
-        <reference local="A_DISPOSAL_LOSS" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="CVALIDCOMBINATION_AASSETACCT3">
-        <reference local="A_ACCUMDEPRECIATION_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <unique name="AASSETACCT_AASSETID_CACCTSC_UN">
+      <unique name="A_ASSET_ACCT_ASSET_ACCTSCHE_UN">
         <unique-column name="A_ASSET_ID"/>
         <unique-column name="C_ACCTSCHEMA_ID"/>
       </unique>
--- a/src-db/database/model/tables/A_ASSET_GROUP.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/A_ASSET_GROUP.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -53,13 +53,13 @@
         <default><![CDATA[Y]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_AASSETGROUP">
+      <foreign-key foreignTable="AD_CLIENT" name="A_ASSET_GROUP_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_AASSETGROUP">
+      <foreign-key foreignTable="AD_ORG" name="A_ASSET_GROUP_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <check name="AASSETGROUP_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="AASSETGROUP_ISOWNED_CHECK"><![CDATA[ISOWNED IN ('Y', 'N')]]></check>
+      <check name="A_ASSET_GROUP_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="A_ASSET_GROUP_ISOWNED_CHK"><![CDATA[ISOWNED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/A_ASSET_GROUP_ACCT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/A_ASSET_GROUP_ACCT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -61,31 +61,31 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="A_ASSET_GROUP" name="AASSETGROUP_AASSETGROUPACCT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="A_ASSET_GROUP_ACCT_A_ACCUMDEPR">
+        <reference local="A_ACCUMDEPRECIATION_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="A_ASSET_GROUP" name="A_ASSET_GROUP_ACCT_A_ASSET_GRO">
         <reference local="A_ASSET_GROUP_ID" foreign="A_ASSET_GROUP_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_AASSETGROUPACCT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="A_ASSET_GROUP_ACCT_A_DEPRECIAT">
+        <reference local="A_DEPRECIATION_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="A_ASSET_GROUP_ACCT_A_DISPOSAL_">
+        <reference local="A_DISPOSAL_LOSS" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="A_ASSET_GROUP_ACCT_A_DISPOSAL1">
+        <reference local="A_DISPOSAL_GAIN" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="A_ASSET_GROUP_ACCT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_AASSETGROUPACCT">
+      <foreign-key foreignTable="AD_ORG" name="A_ASSET_GROUP_ACCT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ACCTSCHEMA" name="CACCTSCHEMA_AASSETGROUPACCT">
+      <foreign-key foreignTable="C_ACCTSCHEMA" name="A_ASSET_GROUP_ACCT_C_ACCTSCHEM">
         <reference local="C_ACCTSCHEMA_ID" foreign="C_ACCTSCHEMA_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="CVALIDCOMBINATION_AASSETGROUP1">
-        <reference local="A_DEPRECIATION_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="CVALIDCOMBINATION_AASSETGROUP2">
-        <reference local="A_ACCUMDEPRECIATION_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="CVALIDCOMBINATION_AASSETGROUP3">
-        <reference local="A_DISPOSAL_LOSS" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="CVALIDCOMBINATION_AASSETGROUPA">
-        <reference local="A_DISPOSAL_GAIN" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <unique name="AASSETGROUPACCT_AASSETGROUP_UN">
+      <unique name="A_ASSET_GROUP_ACCT_ASSET_GR_UN">
         <unique-column name="A_ASSET_GROUP_ID"/>
         <unique-column name="C_ACCTSCHEMA_ID"/>
       </unique>
--- a/src-db/database/model/tables/C_ACCTSCHEMA.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_ACCTSCHEMA.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -103,22 +103,22 @@
       <foreign-key foreignTable="AD_ORG" name="AD_ORG_C_ACCTSCHEMA">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="C_PERIOD" name="C_ACCTSCHEMA_C_PERIOD">
+        <reference local="C_PERIOD_ID" foreign="C_PERIOD_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="C_CURRENCY" name="C_CURRENCY_C_ACCTSCHEMA">
         <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_PERIOD" name="CPERIOD_CACCTSCHEMA">
-        <reference local="C_PERIOD_ID" foreign="C_PERIOD_ID"/>
-      </foreign-key>
       <unique name="C_ACCTSCHEMA_NAME">
         <unique-column name="AD_CLIENT_ID"/>
         <unique-column name="NAME"/>
       </unique>
-      <check name="CACCTSCHEMA_AUTOPERCONT_CHECK"><![CDATA[AUTOPERIODCONTROL IN ('Y', 'N')]]></check>
-      <check name="CACCTSCHEMA_HASALIAS_CHECK"><![CDATA[HASALIAS IN ('Y', 'N')]]></check>
-      <check name="CACCTSCHEMA_HASCOMBINAT_CHECK"><![CDATA[HASCOMBINATION IN ('Y', 'N')]]></check>
-      <check name="CACCTSCHEMA_ISACCRUAL_CHECK"><![CDATA[ISACCRUAL IN ('Y', 'N')]]></check>
-      <check name="CACCTSCHEMA_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="CACCTSCHEMA_ISDISCCORTAX_CHECK"><![CDATA[ISDISCOUNTCORRECTSTAX IN ('Y', 'N')]]></check>
-      <check name="CACCTSCHEMA_ISTRADPOSTED_CHECK"><![CDATA[ISTRADEDISCOUNTPOSTED IN ('Y', 'N')]]></check>
+      <check name="C_ACCTSCHEMA_AUTOPERIODCON_CHK"><![CDATA[AUTOPERIODCONTROL IN ('Y', 'N')]]></check>
+      <check name="C_ACCTSCHEMA_HASALIAS_CHK"><![CDATA[HASALIAS IN ('Y', 'N')]]></check>
+      <check name="C_ACCTSCHEMA_HASCOMBINATIO_CHK"><![CDATA[HASCOMBINATION IN ('Y', 'N')]]></check>
+      <check name="C_ACCTSCHEMA_ISACCRUAL_CHK"><![CDATA[ISACCRUAL IN ('Y', 'N')]]></check>
+      <check name="C_ACCTSCHEMA_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="C_ACCTSCHEMA_ISDISCOUNTCOR_CHK"><![CDATA[ISDISCOUNTCORRECTSTAX IN ('Y', 'N')]]></check>
+      <check name="C_ACCTSCHEMA_ISTRADEDISCOU_CHK"><![CDATA[ISTRADEDISCOUNTPOSTED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_ACCTSCHEMA_DEFAULT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_ACCTSCHEMA_DEFAULT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -285,196 +285,196 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="ACCUMDEP_CACCTSCHEMAACCT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_A_ACCUMDE">
         <reference local="A_ACCUMDEPRECIATION_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CACCTSCHEMADEFAULT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_A_DEPRECI">
+        <reference local="A_DEPRECIATION_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_A_DISPOS1">
+        <reference local="A_DISPOSAL_GAIN" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_A_DISPOSA">
+        <reference local="A_DISPOSAL_LOSS" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="C_ACCTSCHEMA_DEFAULT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CACCTSCHEMADEFAULT">
+      <foreign-key foreignTable="AD_ORG" name="C_ACCTSCHEMA_DEFAULT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ACCTSCHEMA" name="CACCTSCHEMA_DEFAULT" onDelete="cascade">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_B_ASSET_A">
+        <reference local="B_ASSET_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_B_EXPENSE">
+        <reference local="B_EXPENSE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_B_INTERE1">
+        <reference local="B_INTERESTREV_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_B_INTERES">
+        <reference local="B_INTERESTEXP_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_B_INTRANS">
+        <reference local="B_INTRANSIT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_B_PAYMENT">
+        <reference local="B_PAYMENTSELECT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_B_REVALU1">
+        <reference local="B_REVALUATIONLOSS_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_B_REVALUA">
+        <reference local="B_REVALUATIONGAIN_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_B_SETTLE1">
+        <reference local="B_SETTLEMENTLOSS_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_B_SETTLEM">
+        <reference local="B_SETTLEMENTGAIN_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_B_UNALLOC">
+        <reference local="B_UNALLOCATEDCASH_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_B_UNIDENT">
+        <reference local="B_UNIDENTIFIED_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_ACCTSCHEMA" name="C_ACCTSCHEMA_DEFAULT_C_ACCTSCH" onDelete="cascade">
         <reference local="C_ACCTSCHEMA_ID" foreign="C_ACCTSCHEMA_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="DEPRECACCT_CSCHEMADEFAULT">
-        <reference local="A_DEPRECIATION_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_C_PREPAYM">
+        <reference local="C_PREPAYMENT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="DIPOSALLOSS_CSCHEMADEFAULT">
-        <reference local="A_DISPOSAL_LOSS" foreign="C_VALIDCOMBINATION_ID"/>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_C_RECEIVA">
+        <reference local="C_RECEIVABLE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="DISPOSALGAIN_CSCHEMADEFAULT">
-        <reference local="A_DISPOSAL_GAIN" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_BASSET_CSCHEMADEFAULT">
-        <reference local="B_ASSET_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_BEXPENSE_CSCHEMADEFAULT">
-        <reference local="B_EXPENSE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_BINTERESTEXP_CSCHEMADEFAULT">
-        <reference local="B_INTERESTEXP_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_BINTERESTREV_CSCHEMADEFAULT">
-        <reference local="B_INTERESTREV_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_BINTRANSIT_CSCHEMADEFAULT">
-        <reference local="B_INTRANSIT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_BPAYMENTSELECT_CSCHEMADEFAU">
-        <reference local="B_PAYMENTSELECT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_BREVALUATIONGAIN_CSCHEMADEF">
-        <reference local="B_REVALUATIONGAIN_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_BREVALUATIONLOSS_CSCHEMADEF">
-        <reference local="B_REVALUATIONLOSS_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_BSETTLEMENTGAIN_CSCHEMADEFA">
-        <reference local="B_SETTLEMENTGAIN_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_BSETTLEMENTLOSS_CSCHEMADEFA">
-        <reference local="B_SETTLEMENTLOSS_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_BUNALLOCATEDCASH_CSCHEMADEF">
-        <reference local="B_UNALLOCATEDCASH_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_BUNIDENTIFIED_CSCHEMADEFAUL">
-        <reference local="B_UNIDENTIFIED_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_CBASSET_CSCHEMADEFAULT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_CB_ASSET_">
         <reference local="CB_ASSET_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_CBCASHTRANSFER_CSCHEMADEFAU">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_CB_CASHTR">
         <reference local="CB_CASHTRANSFER_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_CBDIFFERENCES_CSCHEMADEFAUL">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_CB_DIFFER">
         <reference local="CB_DIFFERENCES_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_CBEXPENSE_CSCHEMADEFAULT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_CB_EXPENS">
         <reference local="CB_EXPENSE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_CBRECEIPT_CSCHEMADEFAULT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_CB_RECEIP">
         <reference local="CB_RECEIPT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_CHEXPENSE_CSCHEMADEFAULT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_CH_EXPENS">
         <reference local="CH_EXPENSE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_CHREVENUE_CSCHEMADEFAULT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_CH_REVENU">
         <reference local="CH_REVENUE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_CPREPAYMENT_CSCHEMADEFAULT">
-        <reference local="C_PREPAYMENT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_CRECEIVABLE_CSCHEMADEFAULT">
-        <reference local="C_RECEIVABLE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_EEXPENSE_CSCHEMADEFAULT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_E_EXPENSE">
         <reference local="E_EXPENSE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_EPREPAYMENT_CSCHEMADEFAULT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_E_PREPAYM">
         <reference local="E_PREPAYMENT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_NOTINVOICEDREC_CSCHEMADEFAU">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_NOTINVOI1">
+        <reference local="NOTINVOICEDRECEIPTS_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_NOTINVOI2">
+        <reference local="NOTINVOICEDREVENUE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_NOTINVOIC">
         <reference local="NOTINVOICEDRECEIVABLES_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_NOTINVOICEDRECEIPTS_CSCHEMA">
-        <reference local="NOTINVOICEDRECEIPTS_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_NOTINVOICEDREVENUE_CSCHEMAD">
-        <reference local="NOTINVOICEDREVENUE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_PASSET_CSCHEMADEFAULT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_P_ASSET_A">
         <reference local="P_ASSET_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_PAYDISCOUNTEXP_CSCHEMADEFAU">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_P_COGS_AC">
+        <reference local="P_COGS_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_P_EXPENSE">
+        <reference local="P_EXPENSE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_P_INVOICE">
+        <reference local="P_INVOICEPRICEVARIANCE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_P_PURCHAS">
+        <reference local="P_PURCHASEPRICEVARIANCE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_P_REVENUE">
+        <reference local="P_REVENUE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_P_TRADED1">
+        <reference local="P_TRADEDISCOUNTREC_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_P_TRADEDI">
+        <reference local="P_TRADEDISCOUNTGRANT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_PAYDISCO1">
+        <reference local="PAYDISCOUNT_REV_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_PAYDISCOU">
         <reference local="PAYDISCOUNT_EXP_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_PAYDISCOUNTREV_CSCHEMADEFAU">
-        <reference local="PAYDISCOUNT_REV_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_PCOGS_CSCHEMADEFAULT">
-        <reference local="P_COGS_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_PEXPENSE_CSCHEMADEFAULT">
-        <reference local="P_EXPENSE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_PINVOICEPV_CSCHEMADEFAULT">
-        <reference local="P_INVOICEPRICEVARIANCE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_PJASSET_CSCHEMADEFAULT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_PJ_ASSET_">
         <reference local="PJ_ASSET_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_PJWIP_CSCHEMADEFAULT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_PJ_WIP_AC">
         <reference local="PJ_WIP_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_PPURCHASEPV_CSCHEMADEFAULT">
-        <reference local="P_PURCHASEPRICEVARIANCE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_PREVENUE_CSCHEMADEFAULT">
-        <reference local="P_REVENUE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_PTDISCOUNTGRANT_CSCHEMADEFA">
-        <reference local="P_TRADEDISCOUNTGRANT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_PTDISCOUNTREC_CSCHEMADEFAUL">
-        <reference local="P_TRADEDISCOUNTREC_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_REALIZEDGAIN_CSCHEMADEFAULT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_REALIZEDG">
         <reference local="REALIZEDGAIN_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_REALIZEDLOSS_CSCHEMADEFAULT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_REALIZEDL">
         <reference local="REALIZEDLOSS_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_TCREDIT_CSCHEMADEFAULT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_T_CREDIT_">
         <reference local="T_CREDIT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_TDUE_CSCHEMADEFAULT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_T_DUE_ACC">
         <reference local="T_DUE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_TEXPENSE_CSCHEMADEFAULT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_T_EXPENSE">
         <reference local="T_EXPENSE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_TLIABILITY_CSCHEMADEFAULT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_T_LIABILI">
         <reference local="T_LIABILITY_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_TREC_CSCHEMADEFAULT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_T_RECEIVA">
         <reference local="T_RECEIVABLES_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_UNEARNEDREVENUE_CSCHEMADEFA">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_UNEARNEDR">
         <reference local="UNEARNEDREVENUE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_UNREALIZEDGAIN_CSCHEMADEFAU">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_UNREALIZ1">
+        <reference local="UNREALIZEDLOSS_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_UNREALIZE">
         <reference local="UNREALIZEDGAIN_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_UNREALIZEDLOSS_CSCHEMADEFAU">
-        <reference local="UNREALIZEDLOSS_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_V_LIABIL1">
+        <reference local="V_LIABILITY_SERVICES_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_VLIABILITY_CSCHEMADEFAULT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_V_LIABILI">
         <reference local="V_LIABILITY_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_VLIABILITYSERVICES_CSCHEMAD">
-        <reference local="V_LIABILITY_SERVICES_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_VPREPAYMENT_CSCHEMADEFAULT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_V_PREPAYM">
         <reference local="V_PREPAYMENT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_WDIFFERENCES_CSCHEMADEFAULT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_W_DIFFERE">
         <reference local="W_DIFFERENCES_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_WINVACTUALADJUST_CSCHEMADEF">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_W_INVACTU">
         <reference local="W_INVACTUALADJUST_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_WINVENTORY_CSCHEMADEFAULT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_W_INVENTO">
         <reference local="W_INVENTORY_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_WITHHOLDING_CSCHEMADEFAULT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_W_REVALUA">
+        <reference local="W_REVALUATION_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_WITHHOLDI">
         <reference local="WITHHOLDING_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_WREVALUATION_CSCHEMADEFAULT">
-        <reference local="W_REVALUATION_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_WRITEOFF_CSCHEMADEFAULT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_DEFAULT_WRITEOFF_">
         <reference local="WRITEOFF_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
       <unique name="C_ACCTSCHEMA_DE_UN_C_ACCTSCH">
--- a/src-db/database/model/tables/C_ACCTSCHEMA_ELEMENT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_ACCTSCHEMA_ELEMENT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -97,50 +97,50 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CASCHEMAELEMENT">
+      <foreign-key foreignTable="AD_CLIENT" name="C_ACCTSCHEMA_ELEMENT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CASCHEMAELEMENT">
-        <reference local="ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORGID_C_ASCHEMAELEMENT">
+      <foreign-key foreignTable="AD_ORG" name="C_ACCTSCHEMA_ELEMENT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ACCTSCHEMA" name="CACCTSCHEMA_CASCHEMAELEMENT" onDelete="cascade">
+      <foreign-key foreignTable="C_ACCTSCHEMA" name="C_ACCTSCHEMA_ELEMENT_C_ACCTSCH" onDelete="cascade">
         <reference local="C_ACCTSCHEMA_ID" foreign="C_ACCTSCHEMA_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ACTIVITY" name="CACTIVITY_CACCTSCHEMAELEMENT">
+      <foreign-key foreignTable="C_ACTIVITY" name="C_ACCTSCHEMA_ELEMENT_C_ACTIVIT">
         <reference local="C_ACTIVITY_ID" foreign="C_ACTIVITY_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BPARTNER" name="CBUSPARTNER_CASCHEMAELEMENT">
+      <foreign-key foreignTable="C_BPARTNER" name="C_ACCTSCHEMA_ELEMENT_C_BPARTNE">
         <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ELEMENT" name="CELEMENT_CASCHEMAELEMENT">
+      <foreign-key foreignTable="C_CAMPAIGN" name="C_ACCTSCHEMA_ELEMENT_C_CAMPAIG">
+        <reference local="C_CAMPAIGN_ID" foreign="C_CAMPAIGN_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_ELEMENTVALUE" name="C_ACCTSCHEMA_ELEMENT_C_ELEMEN1">
+        <reference local="C_ELEMENTVALUE_ID" foreign="C_ELEMENTVALUE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_ELEMENT" name="C_ACCTSCHEMA_ELEMENT_C_ELEMENT">
         <reference local="C_ELEMENT_ID" foreign="C_ELEMENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ELEMENTVALUE" name="CELEMENTVALUE_CASCHEMAELEMENT">
-        <reference local="C_ELEMENTVALUE_ID" foreign="C_ELEMENTVALUE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_LOCATION" name="CLOCATION_CASCHEMAELEMENT">
+      <foreign-key foreignTable="C_LOCATION" name="C_ACCTSCHEMA_ELEMENT_C_LOCATIO">
         <reference local="C_LOCATION_ID" foreign="C_LOCATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_PROJECT" name="CPROJECT_CASCHEMAELEMENT">
+      <foreign-key foreignTable="C_PROJECT" name="C_ACCTSCHEMA_ELEMENT_C_PROJECT">
         <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_SALESREGION" name="CSALESREGION_CASCHEMAELEMENT">
+      <foreign-key foreignTable="C_SALESREGION" name="C_ACCTSCHEMA_ELEMENT_C_SALESRE">
         <reference local="C_SALESREGION_ID" foreign="C_SALESREGION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="M_PRODUCT" name="MPRODUCT_CASCHEMAELEMENT">
+      <foreign-key foreignTable="M_PRODUCT" name="C_ACCTSCHEMA_ELEMENT_M_PRODUCT">
         <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_CAMPAIGN" name="SOCAMPAIGN_CASCHEMAELEMENT">
-        <reference local="C_CAMPAIGN_ID" foreign="C_CAMPAIGN_ID"/>
+      <foreign-key foreignTable="AD_ORG" name="C_ACCTSCHEMA_ELEMENT_ORG">
+        <reference local="ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
       <index name="C_ACCTSCHEMA_ELEMENT_SCHEMA" unique="false">
         <index-column name="C_ACCTSCHEMA_ID"/>
       </index>
-      <check name="CACCTSCHEL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="CACCTSCHEL_ISBALANCED_CHECK"><![CDATA[ISBALANCED IN ('Y', 'N')]]></check>
-      <check name="CACCTSCHEL_ISMANDATORY_CHECK"><![CDATA[ISMANDATORY IN ('Y', 'N')]]></check>
+      <check name="C_ACCTSCHEMA_ELEMENT_ISACT_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="C_ACCTSCHEMA_ELEMENT_ISBAL_CHK"><![CDATA[ISBALANCED IN ('Y', 'N')]]></check>
+      <check name="C_ACCTSCHEMA_ELEMENT_ISMAN_CHK"><![CDATA[ISMANDATORY IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_ACCTSCHEMA_GL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_ACCTSCHEMA_GL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -85,45 +85,45 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CACCTSCHEMAGL">
+      <foreign-key foreignTable="AD_CLIENT" name="C_ACCTSCHEMA_GL_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CACCTSCHEMAGL">
+      <foreign-key foreignTable="AD_ORG" name="C_ACCTSCHEMA_GL_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="C_ACCTSCHEMA" name="C_ACCTSCHEMA_GL_C_ACCTSCHEMA" onDelete="cascade">
+        <reference local="C_ACCTSCHEMA_ID" foreign="C_ACCTSCHEMA_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_GL_CURRENCYBALANC">
+        <reference local="CURRENCYBALANCING_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_GL_INCOMESUMMARY_">
+        <reference local="INCOMESUMMARY_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_GL_INTERCOMPANYD1">
+        <reference local="INTERCOMPANYDUETO_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_GL_INTERCOMPANYDU">
+        <reference local="INTERCOMPANYDUEFROM_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_GL_PPVOFFSET_ACCT">
+        <reference local="PPVOFFSET_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_GL_RETAINEDEARNIN">
+        <reference local="RETAINEDEARNING_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_GL_SUSPENSEBALANC">
+        <reference local="SUSPENSEBALANCING_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHEMA_GL_SUSPENSEERROR_">
+        <reference local="SUSPENSEERROR_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_ACCTSCHM_GL_C_VLDCMBNTN">
         <reference local="CFS_ORDER_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ACCTSCHEMA" name="CACCTSCHEMA_CACCTSCHEMAGL" onDelete="cascade">
-        <reference local="C_ACCTSCHEMA_ID" foreign="C_ACCTSCHEMA_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_CURRENCYBALANCING_CSCHEMAGL">
-        <reference local="CURRENCYBALANCING_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_INCOMESUMMARY_CSCHEMAGL">
-        <reference local="INCOMESUMMARY_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_INTERCOMPANYDUEFROM_CSCHEMA">
-        <reference local="INTERCOMPANYDUEFROM_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_INTERCOMPANYDUETO_CSCHEMAGL">
-        <reference local="INTERCOMPANYDUETO_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_PPVOFFSET_CSCHEMAGL">
-        <reference local="PPVOFFSET_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_RETAINEDEARNING_CSCHEMAGL">
-        <reference local="RETAINEDEARNING_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_SUSPENSEBALANCING_CSCHEMAGL">
-        <reference local="SUSPENSEBALANCING_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_SUSPENSEERROR_CSCHEMAGL">
-        <reference local="SUSPENSEERROR_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <check name="CACCTSCHEMAGL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="CACCTSCHEMAGL_U_SPEERROR_CHECK"><![CDATA[USESUSPENSEERROR IN ('Y', 'N')]]></check>
-      <check name="CACCTSCHEMAGL_USECURBAL_CHECK"><![CDATA[USECURRENCYBALANCING IN ('Y', 'N')]]></check>
-      <check name="CACCTSCHEMAGL_USESUSPENB_CHECK"><![CDATA[USESUSPENSEBALANCING IN ('Y', 'N')]]></check>
+      <check name="C_ACCTSCHEMA_GL_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="C_ACCTSCHEMA_GL_USECURRENC_CHK"><![CDATA[USECURRENCYBALANCING IN ('Y', 'N')]]></check>
+      <check name="C_ACCTSCHEMA_GL_USESUSPENS_CH1"><![CDATA[USESUSPENSEBALANCING IN ('Y', 'N')]]></check>
+      <check name="C_ACCTSCHEMA_GL_USESUSPENS_CHK"><![CDATA[USESUSPENSEERROR IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_ACCTSCHEMA_PROCESS.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_ACCTSCHEMA_PROCESS.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -55,13 +55,13 @@
       <foreign-key foreignTable="AD_ORG" name="AD_ORG_CACCTSCHEMAPROCESS">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ACCTPROCESS" name="ADACCTPROCESS_CACCTSCHPROCESS">
+      <foreign-key foreignTable="AD_ACCTPROCESS" name="C_ACCTSCHEMA_PROCESS_AD_ACCTPR">
         <reference local="AD_ACCTPROCESS_ID" foreign="AD_ACCTPROCESS_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ACCTSCHEMA" name="CACCTSCHEMA_CACCTSCHPROCESS">
+      <foreign-key foreignTable="C_ACCTSCHEMA" name="C_ACCTSCHEMA_PROCESS_C_ACCTSCH">
         <reference local="C_ACCTSCHEMA_ID" foreign="C_ACCTSCHEMA_ID"/>
       </foreign-key>
-      <check name="CACCTSCHPROCESS_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="CACCTSCHPROCESS_ISDATASET_CHK"><![CDATA[ISDATASET IN ('Y', 'N')]]></check>
+      <check name="C_ACCTSCHEMA_PROCESS_ISACT_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="C_ACCTSCHEMA_PROCESS_ISDAT_CHK"><![CDATA[ISDATASET IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_ACCTSCHEMA_TABLE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_ACCTSCHEMA_TABLE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -58,10 +58,10 @@
       <foreign-key foreignTable="AD_TABLE" name="AD_TABLE_C_ACCTSCHEMA_TABLE" onDelete="cascade">
         <reference local="AD_TABLE_ID" foreign="AD_TABLE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CREATEFACT_TEMPLATE" name="CACCTSCHEMA_ADCREATEFACTTEMP">
+      <foreign-key foreignTable="AD_CREATEFACT_TEMPLATE" name="C_ACCTSCHEMA_TABLE_AD_CREATEFA">
         <reference local="AD_CREATEFACT_TEMPLATE_ID" foreign="AD_CREATEFACT_TEMPLATE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ACCTSCHEMA" name="CACCTSCHEMA_CACCTSCHEMATABLE">
+      <foreign-key foreignTable="C_ACCTSCHEMA" name="C_ACCTSCHEMA_TABLE_C_ACCTSCHEM">
         <reference local="C_ACCTSCHEMA_ID" foreign="C_ACCTSCHEMA_ID"/>
       </foreign-key>
       <unique name="AD_TABLE_C_ACCTSCHEMA_UNIQUE">
--- a/src-db/database/model/tables/C_ACCTSCHEMA_TABLE_DOCTYPE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_ACCTSCHEMA_TABLE_DOCTYPE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -55,12 +55,12 @@
       <foreign-key foreignTable="AD_ORG" name="AD_ORG_C_ACCTSCHEMA_TAB_DOC">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_CREATEFACT_TEMPLATE" name="C_ACCTSCHEMA_TABLE_DOCTYPE_AD_">
+        <reference local="AD_CREATEFACT_TEMPLATE_ID" foreign="AD_CREATEFACT_TEMPLATE_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="C_ACCTSCHEMA_TABLE" name="C_CCTSCHM_TBL_D_C_CCTSCHM_TBL">
         <reference local="C_ACCTSCHEMA_TABLE_ID" foreign="C_ACCTSCHEMA_TABLE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CREATEFACT_TEMPLATE" name="CACCTSCHTABDOC_ADCREATEFACTEMP">
-        <reference local="AD_CREATEFACT_TEMPLATE_ID" foreign="AD_CREATEFACT_TEMPLATE_ID"/>
-      </foreign-key>
       <check name="C_ACCTSCH_TA_DO_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
       <check name="C_ACCTSCH_TA_DO_NEGATIVE_CHECK"><![CDATA[ALLOWNEGATIVE IN ('Y', 'N')]]></check>
     </table>
--- a/src-db/database/model/tables/C_ACCT_RPT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_ACCT_RPT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -53,10 +53,10 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault><![CDATA['N']]></onCreateDefault>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CACCTRPT">
+      <foreign-key foreignTable="AD_CLIENT" name="C_ACCT_RPT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CACCTRPT">
+      <foreign-key foreignTable="AD_ORG" name="C_ACCT_RPT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
       <foreign-key foreignTable="C_ACCTSCHEMA" name="C_ACCT_RPT_C_ACCTSCHEMA">
--- a/src-db/database/model/tables/C_ACCT_RPT_GROUP.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_ACCT_RPT_GROUP.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,14 +49,14 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="C_ACCT_RPT" name="ACCTRPT_CACCTRPTGROUP">
-        <reference local="C_ACCT_RPT_ID" foreign="C_ACCT_RPT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CACCTRPTGROUP">
+      <foreign-key foreignTable="AD_CLIENT" name="C_ACCT_RPT_GROUP_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CACCTRPTGROUP">
+      <foreign-key foreignTable="AD_ORG" name="C_ACCT_RPT_GROUP_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="C_ACCT_RPT" name="C_ACCT_RPT_GROUP_C_ACCT_RPT">
+        <reference local="C_ACCT_RPT_ID" foreign="C_ACCT_RPT_ID"/>
+      </foreign-key>
     </table>
   </database>
--- a/src-db/database/model/tables/C_ACCT_RPT_NODE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_ACCT_RPT_NODE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -53,17 +53,17 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLINET_CACCTRPTNODE">
+      <foreign-key foreignTable="AD_CLIENT" name="C_ACCT_RPT_NODE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CACCTRPTNODE">
+      <foreign-key foreignTable="AD_ORG" name="C_ACCT_RPT_NODE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="C_ACCT_RPT_GROUP" name="C_ACCT_RPT_NODE_C_ACCT_RPT_GRO">
+        <reference local="C_ACCT_RPT_GROUP_ID" foreign="C_ACCT_RPT_GROUP_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="C_ELEMENTVALUE" name="C_ACCT_RPT_NODE_C_ELEMENTVALUE">
         <reference local="C_ELEMENTVALUE_ID" foreign="C_ELEMENTVALUE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ACCT_RPT_GROUP" name="CACCTRPTGROUP_CACCTRPTNODE">
-        <reference local="C_ACCT_RPT_GROUP_ID" foreign="C_ACCT_RPT_GROUP_ID"/>
-      </foreign-key>
     </table>
   </database>
--- a/src-db/database/model/tables/C_ACTIVITY.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_ACTIVITY.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -53,10 +53,10 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CACTIVITY">
+      <foreign-key foreignTable="AD_CLIENT" name="C_ACTIVITY_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CACTIVITY">
+      <foreign-key foreignTable="AD_ORG" name="C_ACTIVITY_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
       <unique name="C_ACTIVITY_VALUE">
--- a/src-db/database/model/tables/C_BANK.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_BANK.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -77,23 +77,23 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CBANK">
+      <foreign-key foreignTable="AD_CLIENT" name="C_BANK_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CBANK">
+      <foreign-key foreignTable="AD_ORG" name="C_BANK_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BPARTNER" name="CBPARTNER_CBANK">
+      <foreign-key foreignTable="C_BPARTNER" name="C_BANK_C_BPARTNER">
         <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_COUNTRY" name="CCOUNTRY_CBANK">
+      <foreign-key foreignTable="C_COUNTRY" name="C_BANK_C_COUNTRY">
         <reference local="C_COUNTRY_ID" foreign="C_COUNTRY_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_LOCATION" name="CLOCATION_CBANK">
+      <foreign-key foreignTable="C_LOCATION" name="C_BANK_C_LOCATION">
         <reference local="C_LOCATION_ID" foreign="C_LOCATION_ID"/>
       </foreign-key>
-      <check name="CBANK_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="CBANK_ISOWNBANK_CHECK"><![CDATA[ISOWNBANK IN ('Y', 'N')]]></check>
-      <check name="CBANK_SPANISHACCOUNT_CHECK"><![CDATA[(((CODEBANK IS NULL) OR (LENGTH((CODEBANK)) = 4)) AND ((CODEBRANCH IS NULL) OR (LENGTH((CODEBRANCH)) = 4))) AND ((DIGITCONTROL IS NULL) OR (LENGTH((DIGITCONTROL)) = 1))]]></check>
+      <check name="C_BANK_CODEBANK_CHK"><![CDATA[(((CODEBANK IS NULL) OR (LENGTH((CODEBANK)) = 4)) AND ((CODEBRANCH IS NULL) OR (LENGTH((CODEBRANCH)) = 4))) AND ((DIGITCONTROL IS NULL) OR (LENGTH((DIGITCONTROL)) = 1))]]></check>
+      <check name="C_BANK_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="C_BANK_ISOWNBANK_CHK"><![CDATA[ISOWNBANK IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_BANKACCOUNT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_BANKACCOUNT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -93,16 +93,16 @@
         <default/>
         <onCreateDefault><![CDATA[SELECT SUBSTR(C_BANK.NAME,23) || '. ' || C_BANK.CODEBANK || '-' || C_BANK.CODEBRANCH || '-' || C_BANK.DIGITCONTROL || '-' || A.DIGITCONTROL || '-' || A.CODEACCOUNT FROM C_BANK, C_BANKACCOUNT A WHERE C_BANK.C_BANK_ID = A.C_BANK_ID AND C_BANKACCOUNT.C_BANKACCOUNT_ID=A.C_BANKACCOUNT_ID]]></onCreateDefault>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CBANKACCOUNT">
+      <foreign-key foreignTable="AD_CLIENT" name="C_BANKACCOUNT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CBANKACCOUNT">
+      <foreign-key foreignTable="AD_ORG" name="C_BANKACCOUNT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BANK" name="CBANK_CBANKACCOUNT" onDelete="cascade">
+      <foreign-key foreignTable="C_BANK" name="C_BANKACCOUNT_C_BANK" onDelete="cascade">
         <reference local="C_BANK_ID" foreign="C_BANK_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_CURRENCY" name="CCURRENCY_CBANKACCOUNT">
+      <foreign-key foreignTable="C_CURRENCY" name="C_BANKACCOUNT_C_CURRENCY">
         <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
       </foreign-key>
       <index name="C_BANKACCT_BANK" unique="false">
--- a/src-db/database/model/tables/C_BANKACCOUNT_ACCT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_BANKACCOUNT_ACCT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -89,55 +89,55 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CBANKACCOUNTACCT">
+      <foreign-key foreignTable="AD_CLIENT" name="C_BANKACCOUNT_ACCT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CBANKACCOUNTACCT">
+      <foreign-key foreignTable="AD_ORG" name="C_BANKACCOUNT_ACCT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ACCTSCHEMA" name="CACCTSCHEMA_CBANKACCOUNTACCT" onDelete="cascade">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BANKACCOUNT_ACCT_B_ASSET_ACC">
+        <reference local="B_ASSET_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BANKACCOUNT_ACCT_B_EXPENSE_A">
+        <reference local="B_EXPENSE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BANKACCOUNT_ACCT_B_INTERESTE">
+        <reference local="B_INTERESTEXP_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BANKACCOUNT_ACCT_B_INTERESTR">
+        <reference local="B_INTERESTREV_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BANKACCOUNT_ACCT_B_INTRANSIT">
+        <reference local="B_INTRANSIT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BANKACCOUNT_ACCT_B_PAYMENTSE">
+        <reference local="B_PAYMENTSELECT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BANKACCOUNT_ACCT_B_REVALUAT1">
+        <reference local="B_REVALUATIONLOSS_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BANKACCOUNT_ACCT_B_REVALUATI">
+        <reference local="B_REVALUATIONGAIN_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BANKACCOUNT_ACCT_B_SETTLEME1">
+        <reference local="B_SETTLEMENTLOSS_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BANKACCOUNT_ACCT_B_SETTLEMEN">
+        <reference local="B_SETTLEMENTGAIN_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BANKACCOUNT_ACCT_B_UNALLOCAT">
+        <reference local="B_UNALLOCATEDCASH_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BANKACCOUNT_ACCT_B_UNIDENTIF">
+        <reference local="B_UNIDENTIFIED_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_ACCTSCHEMA" name="C_BANKACCOUNT_ACCT_C_ACCTSCHEM" onDelete="cascade">
         <reference local="C_ACCTSCHEMA_ID" foreign="C_ACCTSCHEMA_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BANKACCOUNT" name="CBANKACCOUNT_CBANKACCTACCT">
+      <foreign-key foreignTable="C_BANKACCOUNT" name="C_BANKACCOUNT_ACCT_C_BANKACCOU">
         <reference local="C_BANKACCOUNT_ID" foreign="C_BANKACCOUNT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_BASSET_CBANKACCOUNT">
-        <reference local="B_ASSET_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_BEXPENSE_CBANKACCOUNT">
-        <reference local="B_EXPENSE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_BINTERESTEXP_CBANKACCOUNT">
-        <reference local="B_INTERESTEXP_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_BINTERESTREV_CBANKACCOUNT">
-        <reference local="B_INTERESTREV_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_BINTRANSIT_CBANKACCOUNT">
-        <reference local="B_INTRANSIT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_BPAYMENTSELECT_CBANKACCOUNT">
-        <reference local="B_PAYMENTSELECT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_BREVALUATIONGAIN_CBANKACCOU">
-        <reference local="B_REVALUATIONGAIN_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_BREVALUATIONLOSS_CBANKACCOU">
-        <reference local="B_REVALUATIONLOSS_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_BSETTLEMENTGAIN_CBANKACCOUN">
-        <reference local="B_SETTLEMENTGAIN_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_BSETTLEMENTLOSS_CBANKACCOUN">
-        <reference local="B_SETTLEMENTLOSS_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_BUNALLOCATEDCASH_CBANKACCOU">
-        <reference local="B_UNALLOCATEDCASH_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_BUNIDENTIFIED_CBANKACCOUNT">
-        <reference local="B_UNIDENTIFIED_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <unique name="CBANKACCOUNTACCT_CBANKACCOU_UN">
+      <unique name="C_BANKACCOUNT_ACCT_BANKACCO_UN">
         <unique-column name="C_BANKACCOUNT_ID"/>
         <unique-column name="C_ACCTSCHEMA_ID"/>
       </unique>
--- a/src-db/database/model/tables/C_BANKSTATEMENT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_BANKSTATEMENT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -81,13 +81,13 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CBANKSTATEMENT">
+      <foreign-key foreignTable="AD_CLIENT" name="C_BANKSTATEMENT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CBANKSTATEMENT">
+      <foreign-key foreignTable="AD_ORG" name="C_BANKSTATEMENT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BANKACCOUNT" name="CBANKACCOUNT_CBANKSTATEMENT">
+      <foreign-key foreignTable="C_BANKACCOUNT" name="C_BANKSTATEMENT_C_BANKACCOUNT">
         <reference local="C_BANKACCOUNT_ID" foreign="C_BANKACCOUNT_ID"/>
       </foreign-key>
       <index name="C_BANKSTMT_UPDATED" unique="false">
--- a/src-db/database/model/tables/C_BANKSTATEMENTLINE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_BANKSTATEMENTLINE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -101,30 +101,30 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CBANKSTATEMENTLINE">
+      <foreign-key foreignTable="AD_CLIENT" name="C_BANKSTATEMENTLINE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CBANKSTATEMENTLINE">
+      <foreign-key foreignTable="AD_ORG" name="C_BANKSTATEMENTLINE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="C_BANKSTATEMENT" name="C_BANKSTATEMENTLINE_C_BANKSTAT">
+        <reference local="C_BANKSTATEMENT_ID" foreign="C_BANKSTATEMENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_CHARGE" name="C_BANKSTATEMENTLINE_C_CHARGE">
+        <reference local="C_CHARGE_ID" foreign="C_CHARGE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_CURRENCY" name="C_BANKSTATEMENTLINE_C_CURRENCY">
+        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_DEBT_PAYMENT" name="C_BANKSTATEMENTLINE_C_DEBT_PAY">
+        <reference local="C_DEBT_PAYMENT_ID" foreign="C_DEBT_PAYMENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_DP_MANAGEMENT" name="C_BANKSTATEMENTLINE_C_DP_MANAG">
+        <reference local="C_DP_MANAGEMENT_ID" foreign="C_DP_MANAGEMENT_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="C_GLITEM" name="C_BANKSTATEMENTLINE_C_GLITEM">
         <reference local="C_GLITEM_ID" foreign="C_GLITEM_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BANKSTATEMENT" name="CBSTATEMENT_CBSTATEMENTLINE">
-        <reference local="C_BANKSTATEMENT_ID" foreign="C_BANKSTATEMENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_CHARGE" name="CCHARGE_CBANKSTMTLIME">
-        <reference local="C_CHARGE_ID" foreign="C_CHARGE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_CURRENCY" name="CCURRENCY_CBANKSTMTLINE">
-        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_DEBT_PAYMENT" name="CDEBT_PAYMENT_CBANKSTMTLINE">
-        <reference local="C_DEBT_PAYMENT_ID" foreign="C_DEBT_PAYMENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_DP_MANAGEMENT" name="CDPMANAGE_FK_BANKSTATELINE">
-        <reference local="C_DP_MANAGEMENT_ID" foreign="C_DP_MANAGEMENT_ID"/>
-      </foreign-key>
       <index name="C_BANKSTMTLINE_BANKSTMT" unique="false">
         <index-column name="C_BANKSTATEMENT_ID"/>
       </index>
--- a/src-db/database/model/tables/C_BPARTNER.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_BPARTNER.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -304,57 +304,57 @@
       <foreign-key foreignTable="AD_LANGUAGE" name="AD_LANGUAGE_C_BUSPARTNER">
         <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CBPARTNER">
+      <foreign-key foreignTable="AD_CLIENT" name="C_BPARTNER_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CBPARTNER">
+      <foreign-key foreignTable="AD_ORG" name="C_BPARTNER_AD_FORCED_ORG">
+        <reference local="AD_FORCED_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="C_BPARTNER_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BP_TAXCATEGORY" name="BP_CBPTAXCATEGORYPO">
-        <reference local="PO_BP_TAXCATEGORY_ID" foreign="C_BP_TAXCATEGORY_ID"/>
+      <foreign-key foreignTable="C_BPARTNER" name="C_BPARTNER_BPARTNER_PARENT">
+        <reference local="BPARTNER_PARENT_ID" foreign="C_BPARTNER_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BP_TAXCATEGORY" name="BP_CBPTAXCATEGORYSO">
-        <reference local="SO_BP_TAXCATEGORY_ID" foreign="C_BP_TAXCATEGORY_ID"/>
+      <foreign-key foreignTable="C_BP_GROUP" name="C_BPARTNER_C_BP_GROUP">
+        <reference local="C_BP_GROUP_ID" foreign="C_BP_GROUP_ID"/>
       </foreign-key>
       <foreign-key foreignTable="C_BPARTNER" name="C_BPARTNER_C_BPARTNER">
         <reference local="SALESREP_ID" foreign="C_BPARTNER_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="C_GREETING" name="C_BPARTNER_C_GREETING">
+        <reference local="C_GREETING_ID" foreign="C_GREETING_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_INVOICESCHEDULE" name="C_BPARTNER_C_INVOICESCHEDULE">
+        <reference local="C_INVOICESCHEDULE_ID" foreign="C_INVOICESCHEDULE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_PAYMENTTERM" name="C_BPARTNER_C_PAYMENTTERM">
+        <reference local="C_PAYMENTTERM_ID" foreign="C_PAYMENTTERM_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="M_PRICELIST" name="C_BPARTNER_M_PRICELIST" onDelete="setnull">
+        <reference local="M_PRICELIST_ID" foreign="M_PRICELIST_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_BANKACCOUNT" name="C_BPARTNER_PO_BANKACCOUNT">
+        <reference local="PO_BANKACCOUNT_ID" foreign="C_BANKACCOUNT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_BP_TAXCATEGORY" name="C_BPARTNER_PO_BP_TAXCATEGORY">
+        <reference local="PO_BP_TAXCATEGORY_ID" foreign="C_BP_TAXCATEGORY_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_PAYMENTTERM" name="C_BPARTNER_PO_PAYMENTTERM">
+        <reference local="PO_PAYMENTTERM_ID" foreign="C_PAYMENTTERM_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="M_PRICELIST" name="C_BPARTNER_PO_PRICELIST" onDelete="setnull">
+        <reference local="PO_PRICELIST_ID" foreign="M_PRICELIST_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_BANKACCOUNT" name="C_BPARTNER_SO_BANKACCOUNT">
+        <reference local="SO_BANKACCOUNT_ID" foreign="C_BANKACCOUNT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_BP_TAXCATEGORY" name="C_BPARTNER_SO_BP_TAXCATEGORY">
+        <reference local="SO_BP_TAXCATEGORY_ID" foreign="C_BP_TAXCATEGORY_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="C_SALARY_CATEGORY" name="C_SALARY_CATEGORY_CBPARTNER">
         <reference local="C_SALARY_CATEGORY_ID" foreign="C_SALARY_CATEGORY_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BPARTNER" name="CBPARTNER_CPBARTNERPARENT">
-        <reference local="BPARTNER_PARENT_ID" foreign="C_BPARTNER_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_BP_GROUP" name="CBPGROUP_CBPARTNER">
-        <reference local="C_BP_GROUP_ID" foreign="C_BP_GROUP_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_GREETING" name="CGREETING_CBPARTNER">
-        <reference local="C_GREETING_ID" foreign="C_GREETING_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_INVOICESCHEDULE" name="CINVOICESCHEDULE_CBPARTNER">
-        <reference local="C_INVOICESCHEDULE_ID" foreign="C_INVOICESCHEDULE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_PAYMENTTERM" name="CPAYMENTTERM_CBPARTNER">
-        <reference local="C_PAYMENTTERM_ID" foreign="C_PAYMENTTERM_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_PAYMENTTERM" name="CPOPAYMENTTERM_CBPARTNER">
-        <reference local="PO_PAYMENTTERM_ID" foreign="C_PAYMENTTERM_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="FORCEDORG_CBPARTNER">
-        <reference local="AD_FORCED_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="M_PRICELIST" name="MPRICELIST_CBPARTNER" onDelete="setnull">
-        <reference local="M_PRICELIST_ID" foreign="M_PRICELIST_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="M_PRICELIST" name="MPRICELISTPO_CBUSPARTNER" onDelete="setnull">
-        <reference local="PO_PRICELIST_ID" foreign="M_PRICELIST_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_BANKACCOUNT" name="POBACKACCOUTN_CBPARTNER">
-        <reference local="PO_BANKACCOUNT_ID" foreign="C_BANKACCOUNT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_BANKACCOUNT" name="SOBACKACCOUTN_CBPARTNER">
-        <reference local="SO_BANKACCOUNT_ID" foreign="C_BANKACCOUNT_ID"/>
-      </foreign-key>
       <index name="C_BPARTNER_NAME" unique="false">
         <index-column name="NAME"/>
       </index>
@@ -362,17 +362,17 @@
         <unique-column name="AD_CLIENT_ID"/>
         <unique-column name="VALUE"/>
       </unique>
-      <check name="CBPARTNER_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="CBPARTNER_ISCUSTOMER_CHECK"><![CDATA[ISCUSTOMER IN ('Y', 'N')]]></check>
-      <check name="CBPARTNER_ISDIS_TPRINTED_CHECK"><![CDATA[ISDISCOUNTPRINTED IN ('Y', 'N')]]></check>
-      <check name="CBPARTNER_ISEMPLOYEE_CHECK"><![CDATA[ISEMPLOYEE IN ('Y', 'N')]]></check>
-      <check name="CBPARTNER_ISONETIME_CHECK"><![CDATA[ISONETIME IN ('Y', 'N')]]></check>
-      <check name="CBPARTNER_ISPROSPECT_CHECK"><![CDATA[ISPROSPECT IN ('Y', 'N')]]></check>
-      <check name="CBPARTNER_ISSALESREP_CHECK"><![CDATA[ISSALESREP IN ('Y', 'N')]]></check>
-      <check name="CBPARTNER_ISSUMMARY_CHECK"><![CDATA[ISSUMMARY IN ('Y', 'N')]]></check>
-      <check name="CBPARTNER_ISTAXEXEMPT_CHECK"><![CDATA[ISTAXEXEMPT IN ('Y', 'N')]]></check>
-      <check name="CBPARTNER_ISVENDOR_CHECK"><![CDATA[ISVENDOR IN ('Y', 'N')]]></check>
-      <check name="CBPARTNER_SHOWPRICE_CHECK"><![CDATA[SHOWPRICEINORDER IN ('Y', 'N')]]></check>
-      <check name="INVOICERULE_CK_CBPARTNER"><![CDATA[((INVOICERULE) <> 'S') OR (C_INVOICESCHEDULE_ID IS NOT NULL)]]></check>
+      <check name="C_BPARTNER_INVOICERULE_CHK"><![CDATA[((INVOICERULE) <> 'S') OR (C_INVOICESCHEDULE_ID IS NOT NULL)]]></check>
+      <check name="C_BPARTNER_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="C_BPARTNER_ISCUSTOMER_CHK"><![CDATA[ISCUSTOMER IN ('Y', 'N')]]></check>
+      <check name="C_BPARTNER_ISDISCOUNTPRINT_CHK"><![CDATA[ISDISCOUNTPRINTED IN ('Y', 'N')]]></check>
+      <check name="C_BPARTNER_ISEMPLOYEE_CHK"><![CDATA[ISEMPLOYEE IN ('Y', 'N')]]></check>
+      <check name="C_BPARTNER_ISONETIME_CHK"><![CDATA[ISONETIME IN ('Y', 'N')]]></check>
+      <check name="C_BPARTNER_ISPROSPECT_CHK"><![CDATA[ISPROSPECT IN ('Y', 'N')]]></check>
+      <check name="C_BPARTNER_ISSALESREP_CHK"><![CDATA[ISSALESREP IN ('Y', 'N')]]></check>
+      <check name="C_BPARTNER_ISSUMMARY_CHK"><![CDATA[ISSUMMARY IN ('Y', 'N')]]></check>
+      <check name="C_BPARTNER_ISTAXEXEMPT_CHK"><![CDATA[ISTAXEXEMPT IN ('Y', 'N')]]></check>
+      <check name="C_BPARTNER_ISVENDOR_CHK"><![CDATA[ISVENDOR IN ('Y', 'N')]]></check>
+      <check name="C_BPARTNER_SHOWPRICEINORDE_CHK"><![CDATA[SHOWPRICEINORDER IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_BPARTNER_DISCOUNT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_BPARTNER_DISCOUNT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -61,16 +61,16 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault><![CDATA['N']]></onCreateDefault>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="CBPARTDISC_FK_ADCLIENT">
+      <foreign-key foreignTable="AD_CLIENT" name="C_BPARTNER_DISCOUNT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="CBPARTDISC_FK_ADORG">
+      <foreign-key foreignTable="AD_ORG" name="C_BPARTNER_DISCOUNT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BPARTNER" name="CBPARTDISC_FK_CBPARTNER">
+      <foreign-key foreignTable="C_BPARTNER" name="C_BPARTNER_DISCOUNT_C_BPARTNER">
         <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_DISCOUNT" name="CBPARTDISC_FK_CDISC">
+      <foreign-key foreignTable="C_DISCOUNT" name="C_BPARTNER_DISCOUNT_C_DISCOUNT">
         <reference local="C_DISCOUNT_ID" foreign="C_DISCOUNT_ID"/>
       </foreign-key>
       <check name="C_BPDISC_APPLYINORDER_CHECK"><![CDATA[APPLYINORDER IN ('N', 'Y')]]></check>
--- a/src-db/database/model/tables/C_BPARTNER_LOCATION.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_BPARTNER_LOCATION.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -85,31 +85,31 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <foreign-key foreignTable="C_BPARTNER" name="C_BPARTNER_LOCATION_C_BPARTNER" onDelete="cascade">
+        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_LOCATION" name="C_BPARTNER_LOCATION_C_LOCATION">
+        <reference local="C_LOCATION_ID" foreign="C_LOCATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_SALESREGION" name="C_BPARTNER_LOCATION_C_SALESREG" onDelete="setnull">
+        <reference local="C_SALESREGION_ID" foreign="C_SALESREGION_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_CLIENT" name="C_BUSPARTNER_LOCATIONCLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
       <foreign-key foreignTable="AD_ORG" name="C_BUSPARTNER_LOCATIONORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BPARTNER" name="CBPARTNER_CBPLOCATION" onDelete="cascade">
-        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_LOCATION" name="CLOCATION_CBPLOCATION">
-        <reference local="C_LOCATION_ID" foreign="C_LOCATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_SALESREGION" name="CSALESREGION_BPARTNERLOCATION" onDelete="setnull">
-        <reference local="C_SALESREGION_ID" foreign="C_SALESREGION_ID"/>
-      </foreign-key>
       <index name="C_BPLOCATION_BPARTNER" unique="false">
         <index-column name="C_BPARTNER_ID"/>
       </index>
       <index name="C_BPLOCATION_UPDATED" unique="false">
         <index-column name="UPDATED"/>
       </index>
-      <check name="CBPARTLOC_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="CBPARTLOC_ISBILLTO_CHECK"><![CDATA[ISBILLTO IN ('Y', 'N')]]></check>
-      <check name="CBPARTLOC_ISPAYFROM_CHECK"><![CDATA[ISPAYFROM IN ('Y', 'N')]]></check>
-      <check name="CBPARTLOC_ISREMITTO_CHECK"><![CDATA[ISREMITTO IN ('Y', 'N')]]></check>
-      <check name="CBPARTLOC_ISSHIPTO_CHECK"><![CDATA[ISSHIPTO IN ('Y', 'N')]]></check>
+      <check name="C_BPARTNER_LOCATION_ISACTI_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="C_BPARTNER_LOCATION_ISBILL_CHK"><![CDATA[ISBILLTO IN ('Y', 'N')]]></check>
+      <check name="C_BPARTNER_LOCATION_ISPAYF_CHK"><![CDATA[ISPAYFROM IN ('Y', 'N')]]></check>
+      <check name="C_BPARTNER_LOCATION_ISREMI_CHK"><![CDATA[ISREMITTO IN ('Y', 'N')]]></check>
+      <check name="C_BPARTNER_LOCATION_ISSHIP_CHK"><![CDATA[ISSHIPTO IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_BP_BANKACCOUNT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_BP_BANKACCOUNT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -137,26 +137,26 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CBPBANKACCOUNT">
+      <foreign-key foreignTable="AD_CLIENT" name="C_BP_BANKACCOUNT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CBPBANKACCOUNT">
+      <foreign-key foreignTable="AD_ORG" name="C_BP_BANKACCOUNT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_USER" name="ADUSER_CBPBANKACCOUNT">
+      <foreign-key foreignTable="AD_USER" name="C_BP_BANKACCOUNT_AD_USER">
         <reference local="AD_USER_ID" foreign="AD_USER_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="C_BPARTNER" name="C_BP_BANKACCOUNT_C_BPARTNER" onDelete="cascade">
+        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="C_COUNTRY" name="C_BP_BANKACCOUNT_C_COUNTRY">
         <reference local="C_COUNTRY_ID" foreign="C_COUNTRY_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BPARTNER" name="CBPARTNER_CBPBANKACCOUNT" onDelete="cascade">
-        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
-      </foreign-key>
       <index name="C_BPBANKACCT_BPARTNER" unique="false">
         <index-column name="C_BPARTNER_ID"/>
       </index>
       <check name="C_BP_BACC_COUNTRY_CHECK"><![CDATA[(IBAN IS NULL) OR (C_COUNTRY_ID IS NOT NULL)]]></check>
       <check name="C_BP_BACC_IBAN_CHECK"><![CDATA[(((SHOWIBAN = 'Y') AND (SHOWACCOUNTNO = 'N')) AND (IBAN IS NOT NULL)) OR (((SHOWIBAN = 'N') AND (SHOWACCOUNTNO = 'Y')) AND (ACCOUNTNO IS NOT NULL))]]></check>
-      <check name="CBPBANKACCOUNT_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="C_BP_BANKACCOUNT_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_BP_CUSTOMER_ACCT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_BP_CUSTOMER_ACCT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -53,25 +53,25 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CBPCUSTOMERACCT">
+      <foreign-key foreignTable="AD_CLIENT" name="C_BP_CUSTOMER_ACCT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CBPCUSTOMERACCT">
+      <foreign-key foreignTable="AD_ORG" name="C_BP_CUSTOMER_ACCT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ACCTSCHEMA" name="CACCTSCHEMA_CBPCUSTOMERACCT" onDelete="cascade">
+      <foreign-key foreignTable="C_ACCTSCHEMA" name="C_BP_CUSTOMER_ACCT_C_ACCTSCHEM" onDelete="cascade">
         <reference local="C_ACCTSCHEMA_ID" foreign="C_ACCTSCHEMA_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BPARTNER" name="CBUSPARTNER_CBPCUSTOMER_ACCT" onDelete="cascade">
+      <foreign-key foreignTable="C_BPARTNER" name="C_BP_CUSTOMER_ACCT_C_BPARTNER" onDelete="cascade">
         <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_CPREPAYMENT_CBPCUSTOMER">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BP_CUSTOMER_ACCT_C_PREPAYMEN">
         <reference local="C_PREPAYMENT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_CRECEIVABLE_CBPCUSTOMER">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BP_CUSTOMER_ACCT_C_RECEIVABL">
         <reference local="C_RECEIVABLE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <unique name="BPCUSTACC_SCHEMA_ORG_BP_ST_UNI">
+      <unique name="C_BP_CUSTOMER_ACCT_BPARTNER_UN">
         <unique-column name="C_BPARTNER_ID"/>
         <unique-column name="STATUS"/>
         <unique-column name="C_ACCTSCHEMA_ID"/>
--- a/src-db/database/model/tables/C_BP_EMPLOYEE_ACCT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_BP_EMPLOYEE_ACCT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,25 +49,25 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CBPEMPLOYEEACCT">
+      <foreign-key foreignTable="AD_CLIENT" name="C_BP_EMPLOYEE_ACCT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CBPEMPLOYEEACCT">
+      <foreign-key foreignTable="AD_ORG" name="C_BP_EMPLOYEE_ACCT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ACCTSCHEMA" name="CACCTSCHEMA_CBPEMPLOYEEACCT" onDelete="cascade">
+      <foreign-key foreignTable="C_ACCTSCHEMA" name="C_BP_EMPLOYEE_ACCT_C_ACCTSCHEM" onDelete="cascade">
         <reference local="C_ACCTSCHEMA_ID" foreign="C_ACCTSCHEMA_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BPARTNER" name="CBUSPARTNER_C_BPEMPLOYEEACCT" onDelete="cascade">
+      <foreign-key foreignTable="C_BPARTNER" name="C_BP_EMPLOYEE_ACCT_C_BPARTNER" onDelete="cascade">
         <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_EEXPENSE_CBPEMPLOYEE">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BP_EMPLOYEE_ACCT_E_EXPENSE_A">
         <reference local="E_EXPENSE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_EPREPAYMENT_CBPEMPLOYEE">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BP_EMPLOYEE_ACCT_E_PREPAYMEN">
         <reference local="E_PREPAYMENT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <unique name="CBPEMPLOYEEACCT_CBPARTNERID_UN">
+      <unique name="C_BP_EMPLOYEE_ACCT_BPARTNER_UN">
         <unique-column name="C_BPARTNER_ID"/>
         <unique-column name="C_ACCTSCHEMA_ID"/>
       </unique>
--- a/src-db/database/model/tables/C_BP_GROUP.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_BP_GROUP.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,10 +49,10 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CBPGROUP">
+      <foreign-key foreignTable="AD_CLIENT" name="C_BP_GROUP_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CBPGROUP">
+      <foreign-key foreignTable="AD_ORG" name="C_BP_GROUP_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
       <unique name="C_BP_GROUP_VALUE">
--- a/src-db/database/model/tables/C_BP_GROUP_ACCT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_BP_GROUP_ACCT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -113,64 +113,64 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CBPGROUPACCT">
+      <foreign-key foreignTable="AD_CLIENT" name="C_BP_GROUP_ACCT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CBPGROUPACCT">
+      <foreign-key foreignTable="AD_ORG" name="C_BP_GROUP_ACCT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ACCTSCHEMA" name="CACCTSCHEMA_CBPGROUPACCT" onDelete="cascade">
+      <foreign-key foreignTable="C_ACCTSCHEMA" name="C_BP_GROUP_ACCT_C_ACCTSCHEMA" onDelete="cascade">
         <reference local="C_ACCTSCHEMA_ID" foreign="C_ACCTSCHEMA_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BP_GROUP" name="CBPGROUP_CBPGROUPACCT">
+      <foreign-key foreignTable="C_BP_GROUP" name="C_BP_GROUP_ACCT_C_BP_GROUP">
         <reference local="C_BP_GROUP_ID" foreign="C_BP_GROUP_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_CPREPAYMENT_CBPGROUP">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BP_GROUP_ACCT_C_PREPAYMENT_A">
         <reference local="C_PREPAYMENT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_CRECEIVABLE_CBPGROUP">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BP_GROUP_ACCT_C_RECEIVABLE_A">
         <reference local="C_RECEIVABLE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_NOTINVOICEDREC_CBPGROUP">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BP_GROUP_ACCT_NOTINVOICEDRE1">
+        <reference local="NOTINVOICEDRECEIPTS_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BP_GROUP_ACCT_NOTINVOICEDREC">
         <reference local="NOTINVOICEDRECEIVABLES_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_NOTINVOICEDRECEIPTS_CBPGROU">
-        <reference local="NOTINVOICEDRECEIPTS_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_NOTINVOICEDREVENUE_CBPGROUP">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BP_GROUP_ACCT_NOTINVOICEDREV">
         <reference local="NOTINVOICEDREVENUE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_PAYDISCOUNTEXP_CBPGROUP">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BP_GROUP_ACCT_PAYDISCOUNT_EX">
         <reference local="PAYDISCOUNT_EXP_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_PAYDISCOUNTREV_CBPGROUP">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BP_GROUP_ACCT_PAYDISCOUNT_RE">
         <reference local="PAYDISCOUNT_REV_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_REALIZEDGAIN_CBPGROUP">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BP_GROUP_ACCT_REALIZEDGAIN_A">
         <reference local="REALIZEDGAIN_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_REALIZEDLOSS_CBPGROUP">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BP_GROUP_ACCT_REALIZEDLOSS_A">
         <reference local="REALIZEDLOSS_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_UNEARNEDREVENUE_CBPGROUP">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BP_GROUP_ACCT_UNEARNEDREVENU">
         <reference local="UNEARNEDREVENUE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_UNREALIZEDGAIN_CBPGROUP">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BP_GROUP_ACCT_UNREALIZEDGAIN">
         <reference local="UNREALIZEDGAIN_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_UNREALIZEDLOSS_CBPGROUP">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BP_GROUP_ACCT_UNREALIZEDLOSS">
         <reference local="UNREALIZEDLOSS_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_VLIABILITY_CBPGROUP">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BP_GROUP_ACCT_V_LIABILITY_AC">
         <reference local="V_LIABILITY_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_VLIABILITYSERVICES_CBPGROUP">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BP_GROUP_ACCT_V_LIABILITY_SE">
         <reference local="V_LIABILITY_SERVICES_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_VPREPAYMENT_CBPGROUP">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BP_GROUP_ACCT_V_PREPAYMENT_A">
         <reference local="V_PREPAYMENT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_WRITEOFF_CBPGROUP">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BP_GROUP_ACCT_WRITEOFF_ACCT">
         <reference local="WRITEOFF_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
       <check name="C_BP_GROUP_ACCT_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
--- a/src-db/database/model/tables/C_BP_SALCATEGORY.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_BP_SALCATEGORY.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -45,16 +45,16 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CBPEMSALCATEG">
+      <foreign-key foreignTable="AD_CLIENT" name="C_BP_SALCATEGORY_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CBPEMSALCATEG">
+      <foreign-key foreignTable="AD_ORG" name="C_BP_SALCATEGORY_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
       <foreign-key foreignTable="C_BPARTNER" name="C_BP_SALCATEGORY_C_BPARTNER">
         <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_SALARY_CATEGORY" name="CSALARYCAT_CBPEMSALCATEG">
+      <foreign-key foreignTable="C_SALARY_CATEGORY" name="C_BP_SALCATEGORY_C_SALARY_CATE">
         <reference local="C_SALARY_CATEGORY_ID" foreign="C_SALARY_CATEGORY_ID"/>
       </foreign-key>
       <unique name="C_BPSALCAT_SALCAT_DFROM_UN_KEY">
--- a/src-db/database/model/tables/C_BP_TAXCATEGORY.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_BP_TAXCATEGORY.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -41,10 +41,10 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CBPTAXCATEGORY">
+      <foreign-key foreignTable="AD_CLIENT" name="C_BP_TAXCATEGORY_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CBPTAXCATEGORY">
+      <foreign-key foreignTable="AD_ORG" name="C_BP_TAXCATEGORY_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
     </table>
--- a/src-db/database/model/tables/C_BP_VENDOR_ACCT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_BP_VENDOR_ACCT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -57,28 +57,28 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CBPVENDORACCT">
+      <foreign-key foreignTable="AD_CLIENT" name="C_BP_VENDOR_ACCT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CBPVENDORACCT">
+      <foreign-key foreignTable="AD_ORG" name="C_BP_VENDOR_ACCT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="C_ACCTSCHEMA" name="C_BP_VENDOR_ACCT_C_ACCTSCHEMA" onDelete="cascade">
+        <reference local="C_ACCTSCHEMA_ID" foreign="C_ACCTSCHEMA_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BP_VENDOR_ACCT_V_LIABILITY_A">
+        <reference local="V_LIABILITY_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BP_VENDOR_ACCT_V_LIABILITY_S">
+        <reference local="V_LIABILITY_SERVICES_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_BP_VENDOR_ACCT_V_PREPAYMENT_">
+        <reference local="V_PREPAYMENT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="C_BPARTNER" name="C_BUSPARTNER_C_BP_VENDOR_ACCT" onDelete="cascade">
         <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ACCTSCHEMA" name="CACCTSCHEMA_CBPVENDORACCT" onDelete="cascade">
-        <reference local="C_ACCTSCHEMA_ID" foreign="C_ACCTSCHEMA_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_VLIABILITY_CBPVENDOR">
-        <reference local="V_LIABILITY_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_VLIABILITYSERVICES_CBPVENDO">
-        <reference local="V_LIABILITY_SERVICES_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_VPREPAYMENT_CBPVENDOR">
-        <reference local="V_PREPAYMENT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <unique name="BPVENTACC_SCHEMA_ORG_BP_ST_UNI">
+      <unique name="C_BP_VENDOR_ACCT_ACCTSCHEMA_UN">
         <unique-column name="C_ACCTSCHEMA_ID"/>
         <unique-column name="C_BPARTNER_ID"/>
         <unique-column name="AD_ORG_ID"/>
--- a/src-db/database/model/tables/C_BP_WITHHOLDING.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_BP_WITHHOLDING.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -73,28 +73,28 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CBPWITHHOLDING">
+      <foreign-key foreignTable="AD_CLIENT" name="C_BP_WITHHOLDING_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CBPWITHHOLDING">
+      <foreign-key foreignTable="AD_ORG" name="C_BP_WITHHOLDING_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BPARTNER" name="CBPARTNER_CBPWITHHOLDING" onDelete="cascade">
+      <foreign-key foreignTable="C_BPARTNER" name="C_BP_WITHHOLDING_C_BPARTNER" onDelete="cascade">
         <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_TAX" name="CTAX_CBPWITHHOLDING">
+      <foreign-key foreignTable="C_TAX" name="C_BP_WITHHOLDING_C_TAX">
         <reference local="C_TAX_ID" foreign="C_TAX_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_WITHHOLDING" name="CWITHHOLDING_CBPWITHHOLDING">
+      <foreign-key foreignTable="C_WITHHOLDING" name="C_BP_WITHHOLDING_C_WITHHOLDING">
         <reference local="C_WITHHOLDING_ID" foreign="C_WITHHOLDING_ID"/>
       </foreign-key>
-      <unique name="CBPWITHHOLDING_CBPARTNERID__UN">
+      <unique name="C_BP_WITHHOLDING_BPARTNER_W_UN">
         <unique-column name="C_BPARTNER_ID"/>
         <unique-column name="C_WITHHOLDING_ID"/>
         <unique-column name="C_TAX_ID"/>
       </unique>
-      <check name="CBPWITHHOLDING_DHOLDING_CHECK"><![CDATA[ISMANDATORYWITHHOLDING IN ('Y', 'N')]]></check>
-      <check name="CBPWITHHOLDING_EMEXEMPT_CHECK"><![CDATA[ISTEMPORARYEXEMPT IN ('Y', 'N')]]></check>
-      <check name="CBPWITHHOLDING_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="C_BP_WITHHOLDING_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="C_BP_WITHHOLDING_ISMANDATO_CHK"><![CDATA[ISMANDATORYWITHHOLDING IN ('Y', 'N')]]></check>
+      <check name="C_BP_WITHHOLDING_ISTEMPORA_CHK"><![CDATA[ISTEMPORARYEXEMPT IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_BUDGET.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_BUDGET.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -61,13 +61,13 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="BUDGETCLIENT">
+      <foreign-key foreignTable="AD_CLIENT" name="C_BUDGET_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="BUDGETORG">
+      <foreign-key foreignTable="AD_ORG" name="C_BUDGET_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_YEAR" name="BUDGETYEAR">
+      <foreign-key foreignTable="C_YEAR" name="C_BUDGET_C_YEAR">
         <reference local="C_YEAR_ID" foreign="C_YEAR_ID"/>
       </foreign-key>
       <check name="C_BUDGET_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
--- a/src-db/database/model/tables/C_BUDGETLINE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_BUDGETLINE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -121,9 +121,6 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="AC_CLIENT_C_BUDGETLINE">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
       <foreign-key foreignTable="AD_ORG" name="AD_ORG_C_BUDGETLINE">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
@@ -136,6 +133,27 @@
       <foreign-key foreignTable="C_BP_GROUP" name="C_BP_GROUP_C_BUDGETLINE">
         <reference local="C_BP_GROUP_ID" foreign="C_BP_GROUP_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="C_BUDGETLINE_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_ACTIVITY" name="C_BUDGETLINE_C_ACTIVITY">
+        <reference local="C_ACTIVITY_ID" foreign="C_ACTIVITY_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_BUDGET" name="C_BUDGETLINE_C_BUDGET">
+        <reference local="C_BUDGET_ID" foreign="C_BUDGET_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_CAMPAIGN" name="C_BUDGETLINE_C_CAMPAIGN">
+        <reference local="C_CAMPAIGN_ID" foreign="C_CAMPAIGN_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_PERIOD" name="C_BUDGETLINE_C_PERIOD">
+        <reference local="C_PERIOD_ID" foreign="C_PERIOD_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_ELEMENTVALUE" name="C_BUDGETLINE_USER1">
+        <reference local="USER1_ID" foreign="C_ELEMENTVALUE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_ELEMENTVALUE" name="C_BUDGETLINE_USER2">
+        <reference local="USER2_ID" foreign="C_ELEMENTVALUE_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="C_BPARTNER" name="C_BUSPARTNER_C_BUDGETLINE">
         <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
       </foreign-key>
@@ -154,30 +172,12 @@
       <foreign-key foreignTable="C_UOM" name="C_UOM_C_BUDGETLINE">
         <reference local="C_UOM_ID" foreign="C_UOM_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ACTIVITY" name="CACTIVITY_BUDGETLINE">
-        <reference local="C_ACTIVITY_ID" foreign="C_ACTIVITY_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_BUDGET" name="CBUDGET_CBUDGETLINE">
-        <reference local="C_BUDGET_ID" foreign="C_BUDGET_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_ELEMENTVALUE" name="CELEMENTVALUEUSER1_BUDGETLINE">
-        <reference local="USER1_ID" foreign="C_ELEMENTVALUE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_ELEMENTVALUE" name="CELEMENTVALUEUSER2_BUDGETLINE">
-        <reference local="USER2_ID" foreign="C_ELEMENTVALUE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_PERIOD" name="CPERIOD_BUDGETLINE">
-        <reference local="C_PERIOD_ID" foreign="C_PERIOD_ID"/>
-      </foreign-key>
       <foreign-key foreignTable="M_PRODUCT" name="M_PRODUCT_C_BUDGETLINE">
         <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
       </foreign-key>
       <foreign-key foreignTable="M_PRODUCT_CATEGORY" name="M_PRODUCT_CATEGORY_CBUDGETLINE">
         <reference local="M_PRODUCT_CATEGORY_ID" foreign="M_PRODUCT_CATEGORY_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_CAMPAIGN" name="SO_CAMPAIGN_C_BUDGETLINE">
-        <reference local="C_CAMPAIGN_ID" foreign="C_CAMPAIGN_ID"/>
-      </foreign-key>
       <check name="C_BUDGETLINE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_CAMPAIGN.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_CAMPAIGN.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -61,13 +61,13 @@
         <default><![CDATA[0]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CCAMPAIGN">
+      <foreign-key foreignTable="AD_CLIENT" name="C_CAMPAIGN_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CCAMPAIGN">
+      <foreign-key foreignTable="AD_ORG" name="C_CAMPAIGN_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_CHANNEL" name="CCHANNEL_CCAMPAIGN">
+      <foreign-key foreignTable="C_CHANNEL" name="C_CAMPAIGN_C_CHANNEL">
         <reference local="C_CHANNEL_ID" foreign="C_CHANNEL_ID"/>
       </foreign-key>
       <unique name="C_CAMPAIGN_VALUE">
--- a/src-db/database/model/tables/C_CASH.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_CASH.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -101,31 +101,31 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CCASH">
+      <foreign-key foreignTable="AD_CLIENT" name="C_CASH_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CCASH">
+      <foreign-key foreignTable="AD_ORG" name="C_CASH_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CCASH1">
+      <foreign-key foreignTable="AD_ORG" name="C_CASH_AD_ORGTRX">
         <reference local="AD_ORGTRX_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ACTIVITY" name="CACTIVITY_CCASH">
+      <foreign-key foreignTable="C_ACTIVITY" name="C_CASH_C_ACTIVITY">
         <reference local="C_ACTIVITY_ID" foreign="C_ACTIVITY_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_CAMPAIGN" name="CCAMPAIGN_CCASH">
+      <foreign-key foreignTable="C_CAMPAIGN" name="C_CASH_C_CAMPAIGN">
         <reference local="C_CAMPAIGN_ID" foreign="C_CAMPAIGN_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_CASHBOOK" name="CCASHBOOK_CCASH">
+      <foreign-key foreignTable="C_CASHBOOK" name="C_CASH_C_CASHBOOK">
         <reference local="C_CASHBOOK_ID" foreign="C_CASHBOOK_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_PROJECT" name="CPROJECT_CCASH">
+      <foreign-key foreignTable="C_PROJECT" name="C_CASH_C_PROJECT">
         <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
       </foreign-key>
       <index name="C_CASH_UPDATED" unique="false">
         <index-column name="UPDATED"/>
       </index>
-      <check name="CCASH_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="CCASH_PROCESSED_CHECK"><![CDATA[PROCESSED IN ('Y', 'N')]]></check>
+      <check name="C_CASH_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="C_CASH_PROCESSED_CHK"><![CDATA[PROCESSED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_CASHBOOK.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_CASHBOOK.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,13 +49,13 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CCASHBOOK">
+      <foreign-key foreignTable="AD_CLIENT" name="C_CASHBOOK_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CCASHBOOK">
+      <foreign-key foreignTable="AD_ORG" name="C_CASHBOOK_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_CURRENCY" name="CCURRENCY_CCASHBOOK">
+      <foreign-key foreignTable="C_CURRENCY" name="C_CASHBOOK_C_CURRENCY">
         <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
       </foreign-key>
       <check name="C_CASHBOOK_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
--- a/src-db/database/model/tables/C_CASHBOOK_ACCT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_CASHBOOK_ACCT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -61,34 +61,34 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CCASHBOOKACCT">
+      <foreign-key foreignTable="AD_CLIENT" name="C_CASHBOOK_ACCT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CCASHBOOKACCT">
+      <foreign-key foreignTable="AD_ORG" name="C_CASHBOOK_ACCT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ACCTSCHEMA" name="CACCTSCHEMA_CCASHBOOKACCT" onDelete="cascade">
+      <foreign-key foreignTable="C_ACCTSCHEMA" name="C_CASHBOOK_ACCT_C_ACCTSCHEMA" onDelete="cascade">
         <reference local="C_ACCTSCHEMA_ID" foreign="C_ACCTSCHEMA_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_CASHBOOK" name="CCASHBOOK_CCASHBOOKACCT" onDelete="cascade">
+      <foreign-key foreignTable="C_CASHBOOK" name="C_CASHBOOK_ACCT_C_CASHBOOK" onDelete="cascade">
         <reference local="C_CASHBOOK_ID" foreign="C_CASHBOOK_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_CBASSET_CCASHBOOK">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_CASHBOOK_ACCT_CB_ASSET_ACCT">
         <reference local="CB_ASSET_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_CBCASHTRANSFER_CCASHBOOK">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_CASHBOOK_ACCT_CB_CASHTRANSFE">
         <reference local="CB_CASHTRANSFER_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_CBDIFFERENCES_CCASHBOOK">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_CASHBOOK_ACCT_CB_DIFFERENCES">
         <reference local="CB_DIFFERENCES_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_CBEXPENSE_CCASHBOOK">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_CASHBOOK_ACCT_CB_EXPENSE_ACC">
         <reference local="CB_EXPENSE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_CBRECEIPT_CCASHBOOK">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_CASHBOOK_ACCT_CB_RECEIPT_ACC">
         <reference local="CB_RECEIPT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <unique name="CCASHBOOKACCT_CCASHBOOKID_C_UN">
+      <unique name="C_CASHBOOK_ACCT_CASHBOOK_AC_UN">
         <unique-column name="C_CASHBOOK_ID"/>
         <unique-column name="C_ACCTSCHEMA_ID"/>
       </unique>
--- a/src-db/database/model/tables/C_CASHLINE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_CASHLINE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -89,28 +89,28 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CCASHLINE">
+      <foreign-key foreignTable="AD_CLIENT" name="C_CASHLINE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CCASHLINE">
+      <foreign-key foreignTable="AD_ORG" name="C_CASHLINE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="C_CASH" name="C_CASHLINE_C_CASH" onDelete="cascade">
+        <reference local="C_CASH_ID" foreign="C_CASH_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_CHARGE" name="C_CASHLINE_C_CHARGE">
+        <reference local="C_CHARGE_ID" foreign="C_CHARGE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_CURRENCY" name="C_CASHLINE_C_CURRENCY">
+        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_DEBT_PAYMENT" name="C_CASHLINE_C_DEBT_PAYMENT">
+        <reference local="C_DEBT_PAYMENT_ID" foreign="C_DEBT_PAYMENT_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="C_GLITEM" name="C_CASHLINE_C_GLITEM">
         <reference local="C_GLITEM_ID" foreign="C_GLITEM_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_CASH" name="CCASH_CCASHLINE" onDelete="cascade">
-        <reference local="C_CASH_ID" foreign="C_CASH_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_CHARGE" name="CCHARGE_CCASHLINE">
-        <reference local="C_CHARGE_ID" foreign="C_CHARGE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_CURRENCY" name="CCURRENCY_CCASHLINE">
-        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_DEBT_PAYMENT" name="CDEBT_PAYMENT_CCASHLINE">
-        <reference local="C_DEBT_PAYMENT_ID" foreign="C_DEBT_PAYMENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_ORDER" name="CORDER_FK_CCASHLINE">
+      <foreign-key foreignTable="C_ORDER" name="C_CASHLINE_C_ORDER">
         <reference local="C_ORDER_ID" foreign="C_ORDER_ID"/>
       </foreign-key>
       <index name="C_CASHLINE_CASH" unique="false">
@@ -122,9 +122,9 @@
       <unique name="C_CASHLINE_DEBT_PAYMENT">
         <unique-column name="C_DEBT_PAYMENT_ID"/>
       </unique>
-      <check name="CCASHLINE_CHARGE_CHECK"><![CDATA[((CASHTYPE) <> 'C') OR (C_CHARGE_ID IS NOT NULL)]]></check>
-      <check name="CCASHLINE_GLITEM_CHECK"><![CDATA[((CASHTYPE) <> 'G') OR (C_GLITEM_ID IS NOT NULL)]]></check>
-      <check name="CCASHLINE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="CCASHLINE_ISGENERATED_CHECK"><![CDATA[ISGENERATED IN ('Y', 'N')]]></check>
+      <check name="C_CASHLINE_CASHTYPE_CHK"><![CDATA[((CASHTYPE) <> 'C') OR (C_CHARGE_ID IS NOT NULL)]]></check>
+      <check name="C_CASHLINE_CASHTYPE_CHK1"><![CDATA[((CASHTYPE) <> 'G') OR (C_GLITEM_ID IS NOT NULL)]]></check>
+      <check name="C_CASHLINE_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="C_CASHLINE_ISGENERATED_CHK"><![CDATA[ISGENERATED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_CHANNEL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_CHANNEL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -41,10 +41,10 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CCHANNEL">
+      <foreign-key foreignTable="AD_CLIENT" name="C_CHANNEL_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CCHANNEL">
+      <foreign-key foreignTable="AD_ORG" name="C_CHANNEL_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
       <unique name="C_CHANNEL_NAME">
--- a/src-db/database/model/tables/C_CHARGE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_CHARGE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -61,17 +61,17 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CCHARGE">
+      <foreign-key foreignTable="AD_CLIENT" name="C_CHARGE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CCHARGE">
+      <foreign-key foreignTable="AD_ORG" name="C_CHARGE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_TAXCATEGORY" name="CTAXCATEGORY_CCHARGE">
+      <foreign-key foreignTable="C_TAXCATEGORY" name="C_CHARGE_C_TAXCATEGORY">
         <reference local="C_TAXCATEGORY_ID" foreign="C_TAXCATEGORY_ID"/>
       </foreign-key>
-      <check name="CCHARGE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="CCHARGE_ISSAMECURRENCY_CHECK"><![CDATA[ISSAMECURRENCY IN ('Y', 'N')]]></check>
-      <check name="CCHARGE_ISSAMETAX_CHECK"><![CDATA[ISSAMETAX IN ('Y', 'N')]]></check>
+      <check name="C_CHARGE_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="C_CHARGE_ISSAMECURRENCY_CHK"><![CDATA[ISSAMECURRENCY IN ('Y', 'N')]]></check>
+      <check name="C_CHARGE_ISSAMETAX_CHK"><![CDATA[ISSAMETAX IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_CHARGE_ACCT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_CHARGE_ACCT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,25 +49,25 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CCHARGEACCT">
+      <foreign-key foreignTable="AD_CLIENT" name="C_CHARGE_ACCT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CCHARGEACCT">
+      <foreign-key foreignTable="AD_ORG" name="C_CHARGE_ACCT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ACCTSCHEMA" name="CACCTSCHEMA_CCHARGEACCT" onDelete="cascade">
+      <foreign-key foreignTable="C_ACCTSCHEMA" name="C_CHARGE_ACCT_C_ACCTSCHEMA" onDelete="cascade">
         <reference local="C_ACCTSCHEMA_ID" foreign="C_ACCTSCHEMA_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_CHARGE" name="CCHRAGE_CCHARGEACCT">
+      <foreign-key foreignTable="C_CHARGE" name="C_CHARGE_ACCT_C_CHARGE">
         <reference local="C_CHARGE_ID" foreign="C_CHARGE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_CHEXPENSE_CCHARGE">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_CHARGE_ACCT_CH_EXPENSE_ACCT">
         <reference local="CH_EXPENSE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_CHREVENUE_CCHARGE">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_CHARGE_ACCT_CH_REVENUE_ACCT">
         <reference local="CH_REVENUE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <unique name="CCHARGEACCT_CCHARGEID_CACCT_UN">
+      <unique name="C_CHARGE_ACCT_CHARGE_ACCTSC_UN">
         <unique-column name="C_CHARGE_ID"/>
         <unique-column name="C_ACCTSCHEMA_ID"/>
       </unique>
--- a/src-db/database/model/tables/C_CITY.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_CITY.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -61,18 +61,18 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <foreign-key foreignTable="C_COUNTRY" name="C_CITY_C_COUNTRY">
+        <reference local="C_COUNTRY_ID" foreign="C_COUNTRY_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_REGION" name="C_CITY_C_REGION">
+        <reference local="C_REGION_ID" foreign="C_REGION_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_CLIENT" name="C_CITYCLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
       <foreign-key foreignTable="AD_ORG" name="C_CITYORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_COUNTRY" name="CCOUNTRY_CCITY">
-        <reference local="C_COUNTRY_ID" foreign="C_COUNTRY_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_REGION" name="CREGION_CCITY">
-        <reference local="C_REGION_ID" foreign="C_REGION_ID"/>
-      </foreign-key>
       <check name="C_CITY_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_COMMISSION.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_COMMISSION.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -77,23 +77,23 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CCOMMISSION">
+      <foreign-key foreignTable="AD_CLIENT" name="C_COMMISSION_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CCOMMISSION">
+      <foreign-key foreignTable="AD_ORG" name="C_COMMISSION_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BPARTNER" name="CBPARTNER_CCOMMISSION">
+      <foreign-key foreignTable="C_BPARTNER" name="C_COMMISSION_C_BPARTNER">
         <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_CURRENCY" name="CCURRENCY_CCOMMISSION">
+      <foreign-key foreignTable="C_CURRENCY" name="C_COMMISSION_C_CURRENCY">
         <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
       </foreign-key>
       <foreign-key foreignTable="M_PRODUCT" name="M_PRODUCT_CCOMMISSION">
         <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
       </foreign-key>
+      <check name="C_COMMISSION_CREATEFROM_CHK"><![CDATA[CREATEFROM IN ('Y', 'N')]]></check>
       <check name="C_COMMISSION_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="CCOMMISSION_CREATEFROM_CHECK"><![CDATA[CREATEFROM IN ('Y', 'N')]]></check>
-      <check name="CCOMMISSION_LISTDETAILS_CHECK"><![CDATA[LISTDETAILS IN ('Y', 'N')]]></check>
+      <check name="C_COMMISSION_LISTDETAILS_CHK"><![CDATA[LISTDETAILS IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_COMMISSIONAMT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_COMMISSIONAMT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -53,16 +53,16 @@
         <default><![CDATA[0]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CCOMMISSIONAMT">
+      <foreign-key foreignTable="AD_CLIENT" name="C_COMMISSIONAMT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CCOMMISSIONAMT">
+      <foreign-key foreignTable="AD_ORG" name="C_COMMISSIONAMT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_COMMISSIONLINE" name="CCOMLINE_CCOMAMT">
+      <foreign-key foreignTable="C_COMMISSIONLINE" name="C_COMMISSIONAMT_C_COMMISSIONLI">
         <reference local="C_COMMISSIONLINE_ID" foreign="C_COMMISSIONLINE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_COMMISSIONRUN" name="CCOMMENTRUN_CCOMMISSIONAMT" onDelete="cascade">
+      <foreign-key foreignTable="C_COMMISSIONRUN" name="C_COMMISSIONAMT_C_COMMISSIONRU" onDelete="cascade">
         <reference local="C_COMMISSIONRUN_ID" foreign="C_COMMISSIONRUN_ID"/>
       </foreign-key>
       <index name="C_COMMISSIONAMT_COMLINE" unique="false">
--- a/src-db/database/model/tables/C_COMMISSIONDETAIL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_COMMISSIONDETAIL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -69,22 +69,22 @@
         <default><![CDATA[0]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CCOMMISSIONDETAIL">
+      <foreign-key foreignTable="AD_CLIENT" name="C_COMMISSIONDETAIL_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CCOMMISSIONDETAIL">
+      <foreign-key foreignTable="AD_ORG" name="C_COMMISSIONDETAIL_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_COMMISSIONAMT" name="CCOMMISSIONAMT_CCOMDETAIL" onDelete="cascade">
+      <foreign-key foreignTable="C_COMMISSIONAMT" name="C_COMMISSIONDETAIL_C_COMMISSIO" onDelete="cascade">
         <reference local="C_COMMISSIONAMT_ID" foreign="C_COMMISSIONAMT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_CURRENCY" name="CCURRENCY_CCOMMISSIONDETAIL">
+      <foreign-key foreignTable="C_CURRENCY" name="C_COMMISSIONDETAIL_C_CURRENCY">
         <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_INVOICELINE" name="CINVOICELINE_CCOMMISSIONDET">
+      <foreign-key foreignTable="C_INVOICELINE" name="C_COMMISSIONDETAIL_C_INVOICELI">
         <reference local="C_INVOICELINE_ID" foreign="C_INVOICELINE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ORDERLINE" name="CORDERLINE_CCOMMISSIONDETAIL">
+      <foreign-key foreignTable="C_ORDERLINE" name="C_COMMISSIONDETAIL_C_ORDERLINE">
         <reference local="C_ORDERLINE_ID" foreign="C_ORDERLINE_ID"/>
       </foreign-key>
       <check name="C_COMMISSIONDET_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
--- a/src-db/database/model/tables/C_COMMISSIONLINE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_COMMISSIONLINE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -93,38 +93,38 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CCOMMISSIONLINE">
+      <foreign-key foreignTable="AD_CLIENT" name="C_COMMISSIONLINE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORGTRX_CCOMMISSIONLINE">
-        <reference local="ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
       <foreign-key foreignTable="AD_ORG" name="C_COMMISSIONLINE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BPARTNER" name="CBPARTNER_CCOMMISSIONLINE">
+      <foreign-key foreignTable="C_BP_GROUP" name="C_COMMISSIONLINE_C_BP_GROUP">
+        <reference local="C_BP_GROUP_ID" foreign="C_BP_GROUP_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_BPARTNER" name="C_COMMISSIONLINE_C_BPARTNER">
         <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BP_GROUP" name="CBPGROUP_COMMISSIONLINE">
-        <reference local="C_BP_GROUP_ID" foreign="C_BP_GROUP_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_COMMISSION" name="CCOMMISSION_CCOMMISSIONLINE" onDelete="cascade">
+      <foreign-key foreignTable="C_COMMISSION" name="C_COMMISSIONLINE_C_COMMISSION" onDelete="cascade">
         <reference local="C_COMMISSION_ID" foreign="C_COMMISSION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_SALESREGION" name="CSALESREGION_CCOMMISSIONLINE">
+      <foreign-key foreignTable="C_SALESREGION" name="C_COMMISSIONLINE_C_SALESREGION">
         <reference local="C_SALESREGION_ID" foreign="C_SALESREGION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="M_PRODUCT" name="MPRODUCT_CCOMMISSIONLINE">
+      <foreign-key foreignTable="M_PRODUCT" name="C_COMMISSIONLINE_M_PRODUCT">
         <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="M_PRODUCT_CATEGORY" name="MPRODUCTCAT_CCOMMISSIONLINE">
+      <foreign-key foreignTable="M_PRODUCT_CATEGORY" name="C_COMMISSIONLINE_M_PRODUCT_CAT">
         <reference local="M_PRODUCT_CATEGORY_ID" foreign="M_PRODUCT_CATEGORY_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="C_COMMISSIONLINE_ORG">
+        <reference local="ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
       <index name="C_COMMISSIONLINE_COMMISSION" unique="false">
         <index-column name="C_COMMISSION_ID"/>
       </index>
       <check name="C_COMMISSIONLIN_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="CCOMMISL_ISPOSITIVEONLY_CHECK"><![CDATA[ISPOSITIVEONLY IN ('Y', 'N')]]></check>
-      <check name="CCOMNISL_COMMISRDERS_CHECK"><![CDATA[COMMISSIONORDERS IN ('Y', 'N')]]></check>
+      <check name="C_COMMISSIONLINE_COMMISSIO_CHK"><![CDATA[COMMISSIONORDERS IN ('Y', 'N')]]></check>
+      <check name="C_COMMISSIONLINE_ISPOSITIV_CHK"><![CDATA[ISPOSITIVEONLY IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_COMMISSIONRUN.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_COMMISSIONRUN.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -65,18 +65,18 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CCOMMISSIONRUN">
+      <foreign-key foreignTable="AD_CLIENT" name="C_COMMISSIONRUN_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CCOMMISSIONRUN">
+      <foreign-key foreignTable="AD_ORG" name="C_COMMISSIONRUN_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="C_COMMISSION" name="C_COMMISSIONRUN_C_COMMISSION">
+        <reference local="C_COMMISSION_ID" foreign="C_COMMISSION_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="C_INVOICE" name="C_INVOICE_CCOMMISSIONRUN">
         <reference local="C_INVOICE_ID" foreign="C_INVOICE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_COMMISSION" name="CCOMMISSION_CCOMMISSIONRUN">
-        <reference local="C_COMMISSION_ID" foreign="C_COMMISSION_ID"/>
-      </foreign-key>
       <check name="C_COMMISRUN_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
       <check name="C_COMMISRUN_PROCESSED_CHECK"><![CDATA[PROCESSED IN ('Y', 'N')]]></check>
     </table>
--- a/src-db/database/model/tables/C_CONVERSION_RATE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_CONVERSION_RATE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -61,6 +61,9 @@
         <default><![CDATA[0]]></default>
         <onCreateDefault/>
       </column>
+      <foreign-key foreignTable="C_CURRENCY" name="C_CONVERSION_RATE_C_CURRENCY">
+        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_CLIENT" name="C_CONVERSION_RATECLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
@@ -70,9 +73,6 @@
       <foreign-key foreignTable="C_CURRENCY" name="C_CURRENCYCONVRATETO">
         <reference local="C_CURRENCY_ID_TO" foreign="C_CURRENCY_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_CURRENCY" name="CCURRENCY_CCONVERSIONRATE">
-        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
-      </foreign-key>
       <unique name="C_CONVERSIONRATE_ONCE">
         <unique-column name="AD_CLIENT_ID"/>
         <unique-column name="AD_ORG_ID"/>
--- a/src-db/database/model/tables/C_COUNTRY.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_COUNTRY.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -93,21 +93,21 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_LANGUAGE" name="ADLANGUAGE_CCOUNTRY">
+      <foreign-key foreignTable="AD_LANGUAGE" name="C_COUNTRY_AD_LANGUAGE">
         <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
       </foreign-key>
+      <foreign-key foreignTable="C_COUNTRY" name="C_COUNTRY_C_COUNTRY">
+        <reference local="C_COUNTRY_ID" foreign="C_COUNTRY_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_CURRENCY" name="C_COUNTRY_C_CURRENCY">
+        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_CLIENT" name="C_COUNTRYCLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
       <foreign-key foreignTable="AD_ORG" name="C_COUNTRYORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_COUNTRY" name="CCOUNTRY_CCOUNTRY">
-        <reference local="C_COUNTRY_ID" foreign="C_COUNTRY_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_CURRENCY" name="CCURRENCY_CCOUNTRY">
-        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
-      </foreign-key>
       <unique name="C_COUNTRYCODE">
         <unique-column name="COUNTRYCODE"/>
       </unique>
--- a/src-db/database/model/tables/C_COUNTRY_TRL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_COUNTRY_TRL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -61,23 +61,23 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CCOUNTRYTRL">
+      <foreign-key foreignTable="AD_CLIENT" name="C_COUNTRY_TRL_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_LANGUAGE" name="ADLANGUAGE_CCOUNTRYTRL">
+      <foreign-key foreignTable="AD_LANGUAGE" name="C_COUNTRY_TRL_AD_LANGUAGE">
         <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CCOUNTRYTRL">
+      <foreign-key foreignTable="AD_ORG" name="C_COUNTRY_TRL_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_COUNTRY" name="CCOUNTRY_CCOUNTRYTRL" onDelete="cascade">
+      <foreign-key foreignTable="C_COUNTRY" name="C_COUNTRY_TRL_C_COUNTRY" onDelete="cascade">
         <reference local="C_COUNTRY_ID" foreign="C_COUNTRY_ID"/>
       </foreign-key>
-      <unique name="CCOUNTRYTRL_CCOUNTRYID_ADLA_UN">
+      <unique name="C_COUNTRY_TRL_COUNTRY_LANGU_UN">
         <unique-column name="C_COUNTRY_ID"/>
         <unique-column name="AD_LANGUAGE"/>
       </unique>
       <check name="C_COUNTRY_TRL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="CCOUNTRYTRL_ISTRANSL_CHECK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
+      <check name="C_COUNTRY_TRL_ISTRANSLATED_CHK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_CURRENCY_TRL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_CURRENCY_TRL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -53,23 +53,23 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CCURRENCYTRL">
+      <foreign-key foreignTable="AD_CLIENT" name="C_CURRENCY_TRL_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_LANGUAGE" name="ADLANGUAGE_CCURRENCYTRL">
+      <foreign-key foreignTable="AD_LANGUAGE" name="C_CURRENCY_TRL_AD_LANGUAGE">
         <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CCURRENCYTRL">
+      <foreign-key foreignTable="AD_ORG" name="C_CURRENCY_TRL_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_CURRENCY" name="CCURRENCY_CCURRENCYTRL" onDelete="cascade">
+      <foreign-key foreignTable="C_CURRENCY" name="C_CURRENCY_TRL_C_CURRENCY" onDelete="cascade">
         <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
       </foreign-key>
-      <unique name="CCURRENCYTRL_CCURRENCYID_AD_UN">
+      <unique name="C_CURRENCY_TRL_CURRENCY_LAN_UN">
         <unique-column name="C_CURRENCY_ID"/>
         <unique-column name="AD_LANGUAGE"/>
       </unique>
       <check name="C_CURRENCY_TRL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="CCURR_TRL_ISTRANSLATED_CHECK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
+      <check name="C_CURRENCY_TRL_ISTRANSLATE_CHK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_DEBT_PAYMENT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_DEBT_PAYMENT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -157,77 +157,77 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CDEBTPAYMENT">
+      <foreign-key foreignTable="AD_CLIENT" name="C_DEBT_PAYMENT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CDEBTPAYMENT">
+      <foreign-key foreignTable="AD_ORG" name="C_DEBT_PAYMENT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="C_BANKACCOUNT" name="C_DEBT_PAYMENT_C_BANKACCOUNT">
+        <reference local="C_BANKACCOUNT_ID" foreign="C_BANKACCOUNT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_BANKSTATEMENTLINE" name="C_DEBT_PAYMENT_C_BANKSTATEMENT">
+        <reference local="C_BANKSTATEMENTLINE_ID" foreign="C_BANKSTATEMENTLINE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_BPARTNER" name="C_DEBT_PAYMENT_C_BPARTNER">
+        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_CASHBOOK" name="C_DEBT_PAYMENT_C_CASHBOOK">
+        <reference local="C_CASHBOOK_ID" foreign="C_CASHBOOK_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_CASHLINE" name="C_DEBT_PAYMENT_C_CASHLINE">
+        <reference local="C_CASHLINE_ID" foreign="C_CASHLINE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_CURRENCY" name="C_DEBT_PAYMENT_C_CURRENCY">
+        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_GLITEM" name="C_DEBT_PAYMENT_C_GLITEM">
+        <reference local="C_GLITEM_ID" foreign="C_GLITEM_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_INVOICE" name="C_DEBT_PAYMENT_C_INVOICE">
+        <reference local="C_INVOICE_ID" foreign="C_INVOICE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_ORDER" name="C_DEBT_PAYMENT_C_ORDER">
+        <reference local="C_ORDER_ID" foreign="C_ORDER_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_PROJECT" name="C_DEBT_PAYMENT_C_PROJECT">
+        <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_SETTLEMENT" name="C_DEBT_PAYMENT_C_SETTLEMENT_CA">
+        <reference local="C_SETTLEMENT_CANCEL_ID" foreign="C_SETTLEMENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_SETTLEMENT" name="C_DEBT_PAYMENT_C_SETTLEMENT_GE">
+        <reference local="C_SETTLEMENT_GENERATE_ID" foreign="C_SETTLEMENT_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="C_WITHHOLDING" name="C_DEBT_PAYMENT_C_WITHHOLDING">
         <reference local="C_WITHHOLDING_ID" foreign="C_WITHHOLDING_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BANKACCOUNT" name="CBANKACCOUNT_CDEBTPAYMENT">
-        <reference local="C_BANKACCOUNT_ID" foreign="C_BANKACCOUNT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_BANKSTATEMENTLINE" name="CBANKSTATEMENTLINE_CDEBTPAY">
-        <reference local="C_BANKSTATEMENTLINE_ID" foreign="C_BANKSTATEMENTLINE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_BPARTNER" name="CBPARTNER_CDEBTPAYMENT">
-        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_CASHBOOK" name="CCASHBOOK_CDEBTPAYMENT">
-        <reference local="C_CASHBOOK_ID" foreign="C_CASHBOOK_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_CASHLINE" name="CCASHLINE_CDEBTPAYMENT">
-        <reference local="C_CASHLINE_ID" foreign="C_CASHLINE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_CURRENCY" name="CCURRENCY_CDEBTPAYMENT">
-        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_GLITEM" name="CGLITEM_CDEBTPAYMENT">
-        <reference local="C_GLITEM_ID" foreign="C_GLITEM_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_INVOICE" name="CINVOICE_CDEBTPAYMENT">
-        <reference local="C_INVOICE_ID" foreign="C_INVOICE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_PROJECT" name="CPROJECT_CBEBTPAYMENT">
-        <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_SETTLEMENT" name="CSETTLEMENTCANCEL_CDEBTPAYMENT">
-        <reference local="C_SETTLEMENT_CANCEL_ID" foreign="C_SETTLEMENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_SETTLEMENT" name="CSETTLEMENTGEN_CDEBTPAYMENT">
-        <reference local="C_SETTLEMENT_GENERATE_ID" foreign="C_SETTLEMENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_ORDER" name="ORDER_DEBTPAYMENT">
-        <reference local="C_ORDER_ID" foreign="C_ORDER_ID"/>
-      </foreign-key>
-      <index name="SETTBPARTNER_DEBT_PAYMENT" unique="false">
+      <index name="C_DEBT_PAYMENT_BPARTNER_IDX" unique="false">
         <index-column name="C_BPARTNER_ID"/>
       </index>
-      <index name="SETTCANCEL_DEBT_PAYMENT" unique="false">
+      <index name="C_DEBT_PAYMENT_INVOICE_IDX" unique="false">
+        <index-column name="C_INVOICE_ID"/>
+      </index>
+      <index name="C_DEBT_PAYMENT_SETTCANCEL_IDX" unique="false">
         <index-column name="C_SETTLEMENT_CANCEL_ID"/>
       </index>
-      <index name="SETTGENERATE_DEBT_PAYMENT" unique="false">
+      <index name="C_DEBT_PAYMENT_SETTGENERAT_IDX" unique="false">
         <index-column name="C_SETTLEMENT_GENERATE_ID"/>
       </index>
-      <index name="SETTINVOICE_DEBT_PAYMENT" unique="false">
-        <index-column name="C_INVOICE_ID"/>
-      </index>
+      <check name="C_DEBT_PAYMENT_C_BANKSTATE_CHK"><![CDATA[((C_BANKSTATEMENTLINE_ID IS NULL) AND (C_CASHLINE_ID IS NULL)) OR (ISPAID = 'Y')]]></check>
+      <check name="C_DEBT_PAYMENT_C_BPARTNER__CHK"><![CDATA[C_BPARTNER_ID IS NOT NULL]]></check>
+      <check name="C_DEBT_PAYMENT_C_CASHLINE__CHK"><![CDATA[(C_CASHLINE_ID IS NULL) OR (C_BANKSTATEMENTLINE_ID IS NULL)]]></check>
+      <check name="C_DEBT_PAYMENT_C_SETTLEMEN_CH1"><![CDATA[((C_SETTLEMENT_CANCEL_ID IS NOT NULL) OR (C_SETTLEMENT_GENERATE_ID IS NOT NULL)) OR (ISPAID = 'N')]]></check>
+      <check name="C_DEBT_PAYMENT_C_SETTLEMEN_CHK"><![CDATA[(C_SETTLEMENT_CANCEL_ID IS NULL) OR (ISVALID = 'Y')]]></check>
+      <check name="C_DEBT_PAYMENT_CANCEL_PROC_CH1"><![CDATA[CANCEL_PROCESSED IN ('Y', 'N')]]></check>
+      <check name="C_DEBT_PAYMENT_CANCEL_PROC_CHK"><![CDATA[(CANCEL_PROCESSED = 'N') OR (C_SETTLEMENT_CANCEL_ID IS NOT NULL)]]></check>
+      <check name="C_DEBT_PAYMENT_GENERATE_PR_CHK"><![CDATA[GENERATE_PROCESSED IN ('Y', 'N')]]></check>
       <check name="C_DEBT_PAYMENT_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="C_DEBT_PAYMENT_ISDIRECTPOS_CHK"><![CDATA[(ISDIRECTPOSTING = 'N') OR (C_GLITEM_ID IS NOT NULL)]]></check>
       <check name="C_DEBT_PAYMENT_ISMANUAL"><![CDATA[ISMANUAL IN ('Y', 'N')]]></check>
       <check name="C_DEBT_PAYMENT_ISRECEIPT"><![CDATA[ISRECEIPT IN ('Y', 'N')]]></check>
       <check name="C_DEBT_PAYMENT_ISVALID"><![CDATA[ISVALID IN ('Y', 'N')]]></check>
-      <check name="CANCEL_DEBT_PAYMENT"><![CDATA[(CANCEL_PROCESSED = 'N') OR (C_SETTLEMENT_CANCEL_ID IS NOT NULL)]]></check>
-      <check name="CANCELISVALID_DEBT_PAYMENT"><![CDATA[(C_SETTLEMENT_CANCEL_ID IS NULL) OR (ISVALID = 'Y')]]></check>
-      <check name="CBPARTNER_DEBT_PAYMENT"><![CDATA[C_BPARTNER_ID IS NOT NULL]]></check>
-      <check name="CDEBTPAYM_CANCEL_PROCESSED"><![CDATA[CANCEL_PROCESSED IN ('Y', 'N')]]></check>
-      <check name="CDEBTPAYM_GENERATE_PROCESSED"><![CDATA[GENERATE_PROCESSED IN ('Y', 'N')]]></check>
-      <check name="CLINE_BSLINE_DEBT_PAYMENT"><![CDATA[(C_CASHLINE_ID IS NULL) OR (C_BANKSTATEMENTLINE_ID IS NULL)]]></check>
-      <check name="DIRECTPOSTING_DEBT_PAYMENT_CHK"><![CDATA[(ISDIRECTPOSTING = 'N') OR (C_GLITEM_ID IS NOT NULL)]]></check>
-      <check name="ISPAID_CDEBTPAYMENT"><![CDATA[((C_SETTLEMENT_CANCEL_ID IS NOT NULL) OR (C_SETTLEMENT_GENERATE_ID IS NOT NULL)) OR (ISPAID = 'N')]]></check>
-      <check name="ISPAID2_CDEBTPAYMENT"><![CDATA[((C_BANKSTATEMENTLINE_ID IS NULL) AND (C_CASHLINE_ID IS NULL)) OR (ISPAID = 'Y')]]></check>
-      <check name="ISVALIDACTIVE_DEBT_PAYMENT"><![CDATA[(ISVALID = 'N') OR (ISACTIVE = 'Y')]]></check>
-      <check name="ISVALIDPLUS_DEBT_PAYMENT2"><![CDATA[(((ISVALID = 'Y') AND (((C_SETTLEMENT_GENERATE_ID IS NULL) AND (GENERATE_PROCESSED = 'N')) OR ((C_SETTLEMENT_GENERATE_ID IS NOT NULL) AND (GENERATE_PROCESSED = 'Y')))) OR (((ISVALID = 'N') AND (C_SETTLEMENT_GENERATE_ID IS NOT NULL)) AND (GENERATE_PROCESSED = 'N'))) OR ((ISVALID = 'N') AND (ISAUTOMATICGENERATED = 'N'))]]></check>
+      <check name="C_DEBT_PAYMENT_ISVALID_CHK"><![CDATA[(ISVALID = 'N') OR (ISACTIVE = 'Y')]]></check>
+      <check name="C_DEBT_PAYMENT_ISVALID_CHK1"><![CDATA[(((ISVALID = 'Y') AND (((C_SETTLEMENT_GENERATE_ID IS NULL) AND (GENERATE_PROCESSED = 'N')) OR ((C_SETTLEMENT_GENERATE_ID IS NOT NULL) AND (GENERATE_PROCESSED = 'Y')))) OR (((ISVALID = 'N') AND (C_SETTLEMENT_GENERATE_ID IS NOT NULL)) AND (GENERATE_PROCESSED = 'N'))) OR ((ISVALID = 'N') AND (ISAUTOMATICGENERATED = 'N'))]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_DEBT_PAYMENT_BALANCING.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_DEBT_PAYMENT_BALANCING.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,22 +49,22 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CDEBTPAYMENTBALANCING">
+      <foreign-key foreignTable="AD_CLIENT" name="C_DEBT_PAYMENT_BALANCING_AD_CL">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CDEBTPAYMENTBALANCING">
+      <foreign-key foreignTable="AD_ORG" name="C_DEBT_PAYMENT_BALANCING_AD_OR">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_DEBT_PAYMENT" name="CDEBTPAYMENTID_CDEBBALANCING">
+      <foreign-key foreignTable="C_DEBT_PAYMENT" name="C_DEBT_PAYMENT_BALANCING_C_DEB">
         <reference local="C_DEBT_PAYMENT_ID" foreign="C_DEBT_PAYMENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_GLITEM" name="CGLITEM_DEBTPAYMENTBALANCING">
+      <foreign-key foreignTable="C_GLITEM" name="C_DEBT_PAYMENT_BALANCING_C_GLI">
         <reference local="C_GLITEM_ID" foreign="C_GLITEM_ID"/>
       </foreign-key>
       <index name="C_DEBT_PAYMENT_BALANCING_NU_DP" unique="false">
         <index-column name="C_DEBT_PAYMENT_ID"/>
         <index-column name="C_GLITEM_ID"/>
       </index>
-      <check name="CDEBTPAYBALG_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="C_DEBT_PAYMENT_BALANCING_I_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_DEBT_PAYMENT_BAL_REPLACE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_DEBT_PAYMENT_BAL_REPLACE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -53,18 +53,18 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CDEBTPAYMENTBALREPLAC">
+      <foreign-key foreignTable="AD_CLIENT" name="C_DEBT_PAYMENT_BAL_REPLACE_AD_">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CDEBTPAYMENTBALREPLACE">
+      <foreign-key foreignTable="AD_ORG" name="C_DEBT_PAYMENT_BAL_REPLACE_AD1">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_DEBT_PAYMENT" name="CDEBTPAYMENTID_CDEBBALREP">
+      <foreign-key foreignTable="C_DEBT_PAYMENT" name="C_DEBT_PAYMENT_BAL_REPLACE_C_D">
         <reference local="C_DEBT_PAYMENT_ID" foreign="C_DEBT_PAYMENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_GLITEM" name="CGLITEM_DEBTPAYMENTBALREP">
+      <foreign-key foreignTable="C_GLITEM" name="C_DEBT_PAYMENT_BAL_REPLACE_C_G">
         <reference local="C_GLITEM_ID" foreign="C_GLITEM_ID"/>
       </foreign-key>
-      <check name="CDEBTPAYBALREP_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="C_DEBT_PAYMENT_BAL_REPLACE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_DISCOUNT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_DISCOUNT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,13 +49,13 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="CDISC_FK_ADCLIENT">
+      <foreign-key foreignTable="AD_CLIENT" name="C_DISCOUNT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="CDISCOUNT_FK_ADORG">
+      <foreign-key foreignTable="AD_ORG" name="C_DISCOUNT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="M_PRODUCT" name="CDISCOUNT_FK_MPRODUCT">
+      <foreign-key foreignTable="M_PRODUCT" name="C_DISCOUNT_M_PRODUCT">
         <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
       </foreign-key>
     </table>
--- a/src-db/database/model/tables/C_DOCTYPE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_DOCTYPE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -104,25 +104,25 @@
       <foreign-key foreignTable="AD_SEQUENCE" name="AD_SEQUENCE_DOCTYPEDOC">
         <reference local="DOCNOSEQUENCE_ID" foreign="AD_SEQUENCE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CDOCTYPE">
+      <foreign-key foreignTable="AD_CLIENT" name="C_DOCTYPE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CDOCTYPE">
+      <foreign-key foreignTable="AD_ORG" name="C_DOCTYPE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_TABLE" name="ADTABLE_CDOCTYPE" onDelete="cascade">
+      <foreign-key foreignTable="AD_TABLE" name="C_DOCTYPE_AD_TABLE" onDelete="cascade">
         <reference local="AD_TABLE_ID" foreign="AD_TABLE_ID"/>
       </foreign-key>
       <foreign-key foreignTable="C_DOCTYPE" name="C_DOCTYPE_C_DOCTYPE">
         <reference local="C_DOCTYPE_REVERSED_ID" foreign="C_DOCTYPE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_DOCTYPE" name="CDOCTYPE_INVOICE">
+      <foreign-key foreignTable="C_DOCTYPE" name="C_DOCTYPE_C_DOCTYPEINVOICE">
         <reference local="C_DOCTYPEINVOICE_ID" foreign="C_DOCTYPE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_DOCTYPE" name="CDOCTYPE_SHIPMENT">
+      <foreign-key foreignTable="C_DOCTYPE" name="C_DOCTYPE_C_DOCTYPESHIPMENT">
         <reference local="C_DOCTYPESHIPMENT_ID" foreign="C_DOCTYPE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="GL_CATEGORY" name="GLCATEGORY_CDOCTYPE">
+      <foreign-key foreignTable="GL_CATEGORY" name="C_DOCTYPE_GL_CATEGORY">
         <reference local="GL_CATEGORY_ID" foreign="GL_CATEGORY_ID"/>
       </foreign-key>
       <unique name="C_DOCTYPE_NAME">
@@ -130,8 +130,8 @@
         <unique-column name="NAME"/>
       </unique>
       <check name="C_DOCTYPE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="C_DOCTYPE_ISDOCNOCONTROLLE_CHK"><![CDATA[ISDOCNOCONTROLLED IN ('Y', 'N')]]></check>
       <check name="C_DOCTYPE_ISSOTRX_CHECK"><![CDATA[ISSOTRX IN ('Y', 'N')]]></check>
       <check name="C_DOCTYPE_ORGFILTERED_CHECK"><![CDATA[ORGFILTERED IN ('Y', 'N')]]></check>
-      <check name="CDOCTYPEISDOCNOCONTROL_CHECK"><![CDATA[ISDOCNOCONTROLLED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_DOCTYPE_TRL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_DOCTYPE_TRL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -57,23 +57,23 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CDOCTYPETRL">
+      <foreign-key foreignTable="AD_CLIENT" name="C_DOCTYPE_TRL_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_LANGUAGE" name="ADLANGUAGE_CDOCTYPETRL">
+      <foreign-key foreignTable="AD_LANGUAGE" name="C_DOCTYPE_TRL_AD_LANGUAGE">
         <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CDOCTYPETRL">
+      <foreign-key foreignTable="AD_ORG" name="C_DOCTYPE_TRL_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_DOCTYPE" name="CDOCTYPE_CDOCTYPETRL" onDelete="cascade">
+      <foreign-key foreignTable="C_DOCTYPE" name="C_DOCTYPE_TRL_C_DOCTYPE" onDelete="cascade">
         <reference local="C_DOCTYPE_ID" foreign="C_DOCTYPE_ID"/>
       </foreign-key>
-      <unique name="CDOCTYPETRL_CDOCTYPEID_ADLA_UN">
+      <unique name="C_DOCTYPE_TRL_DOCTYPE_LANGU_UN">
         <unique-column name="C_DOCTYPE_ID"/>
         <unique-column name="AD_LANGUAGE"/>
       </unique>
       <check name="C_DOCTYPE_TRL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="CDOCTYPETRL_ISTRANSLAT_CHECK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
+      <check name="C_DOCTYPE_TRL_ISTRANSLATED_CHK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_DP_MANAGEMENT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_DP_MANAGEMENT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -93,25 +93,25 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CDPMANAGEMENT">
+      <foreign-key foreignTable="AD_CLIENT" name="C_DP_MANAGEMENT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CDPMANAGEMENT">
+      <foreign-key foreignTable="AD_ORG" name="C_DP_MANAGEMENT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ACTIVITY" name="CACTIVITY_CDPMANAGEMENT">
+      <foreign-key foreignTable="C_ACTIVITY" name="C_DP_MANAGEMENT_C_ACTIVITY">
         <reference local="C_ACTIVITY_ID" foreign="C_ACTIVITY_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_CAMPAIGN" name="CCAMPAIGN_CDPMANAGEMENT">
+      <foreign-key foreignTable="C_CAMPAIGN" name="C_DP_MANAGEMENT_C_CAMPAIGN">
         <reference local="C_CAMPAIGN_ID" foreign="C_CAMPAIGN_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_CURRENCY" name="CCURRENCY_CDPMANAGEMENT">
+      <foreign-key foreignTable="C_CURRENCY" name="C_DP_MANAGEMENT_C_CURRENCY">
         <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_DOCTYPE" name="CDOCTYPE_CDPMANAGEMENT">
+      <foreign-key foreignTable="C_DOCTYPE" name="C_DP_MANAGEMENT_C_DOCTYPE">
         <reference local="C_DOCTYPE_ID" foreign="C_DOCTYPE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_PROJECT" name="CPROJECT_CDPMANAGEMENT">
+      <foreign-key foreignTable="C_PROJECT" name="C_DP_MANAGEMENT_C_PROJECT">
         <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
       </foreign-key>
     </table>
--- a/src-db/database/model/tables/C_DP_MANAGEMENTLINE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_DP_MANAGEMENTLINE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -53,17 +53,17 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CDPMANAGEMENTLINE">
+      <foreign-key foreignTable="AD_CLIENT" name="C_DP_MANAGEMENTLINE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CDPMANAGEMENTLINE">
+      <foreign-key foreignTable="AD_ORG" name="C_DP_MANAGEMENTLINE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_DP_MANAGEMENT" name="CDPMANAGEMENT_CDPMANAGEMENTLIN">
+      <foreign-key foreignTable="C_DEBT_PAYMENT" name="C_DP_MANAGEMENTLINE_C_DEBT_PAY">
+        <reference local="C_DEBT_PAYMENT_ID" foreign="C_DEBT_PAYMENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_DP_MANAGEMENT" name="C_DP_MANAGEMENTLINE_C_DP_MANAG">
         <reference local="C_DP_MANAGEMENT_ID" foreign="C_DP_MANAGEMENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_DEBT_PAYMENT" name="DEBTPAYMENT_DPMANAGEMENTLINE">
-        <reference local="C_DEBT_PAYMENT_ID" foreign="C_DEBT_PAYMENT_ID"/>
-      </foreign-key>
     </table>
   </database>
--- a/src-db/database/model/tables/C_ELEMENT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_ELEMENT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -69,16 +69,16 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CELEMENT">
+      <foreign-key foreignTable="AD_CLIENT" name="C_ELEMENT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_TREE" name="ADTREE_CELEMENT" onDelete="setnull">
+      <foreign-key foreignTable="AD_TREE" name="C_ELEMENT_AD_TREE" onDelete="setnull">
         <reference local="AD_TREE_ID" foreign="AD_TREE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_TREE" name="ADTREE1_CELEMENT" onDelete="setnull">
+      <foreign-key foreignTable="AD_TREE" name="C_ELEMENT_ADD1TREE" onDelete="setnull">
         <reference local="ADD1TREE_ID" foreign="AD_TREE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_TREE" name="ADTREE2_CELEMENT" onDelete="setnull">
+      <foreign-key foreignTable="AD_TREE" name="C_ELEMENT_ADD2TREE" onDelete="setnull">
         <reference local="ADD2TREE_ID" foreign="AD_TREE_ID"/>
       </foreign-key>
       <foreign-key foreignTable="AD_ORG" name="C_ELEMENTORG">
@@ -90,6 +90,6 @@
       </unique>
       <check name="C_ELEMENT_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
       <check name="C_ELEMENT_ISBALANCING_CHECK"><![CDATA[ISBALANCING IN ('Y', 'N')]]></check>
-      <check name="CELEM_ISNATURACCOUNT_CHECK"><![CDATA[ISNATURALACCOUNT IN ('Y', 'N')]]></check>
+      <check name="C_ELEMENT_ISNATURALACCOUNT_CHK"><![CDATA[ISNATURALACCOUNT IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_ELEMENTVALUE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_ELEMENTVALUE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -117,19 +117,19 @@
         <default><![CDATA[C]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CELEMENTVALUE">
+      <foreign-key foreignTable="AD_CLIENT" name="C_ELEMENTVALUE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CELEMENTVALUE">
+      <foreign-key foreignTable="AD_ORG" name="C_ELEMENTVALUE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BANKACCOUNT" name="CBANKACCOUNT_CELEMENTVALUE">
+      <foreign-key foreignTable="C_BANKACCOUNT" name="C_ELEMENTVALUE_C_BANKACCOUNT">
         <reference local="C_BANKACCOUNT_ID" foreign="C_BANKACCOUNT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_CURRENCY" name="CCURRENCY_CELEMENTVALUE">
+      <foreign-key foreignTable="C_CURRENCY" name="C_ELEMENTVALUE_C_CURRENCY">
         <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ELEMENT" name="CELEMENT_CELEMENTVALUE" onDelete="cascade">
+      <foreign-key foreignTable="C_ELEMENT" name="C_ELEMENTVALUE_C_ELEMENT" onDelete="cascade">
         <reference local="C_ELEMENT_ID" foreign="C_ELEMENT_ID"/>
       </foreign-key>
       <index name="C_ELEMENTVALUE_NAME" unique="false">
@@ -140,12 +140,12 @@
         <unique-column name="VALUE"/>
       </unique>
       <check name="C_ELEMENTVALUE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="CELEMVAL_ISBANKACCOUNT_CHECK"><![CDATA[ISBANKACCOUNT IN ('Y', 'N')]]></check>
-      <check name="CELEMVAL_ISDOCCONTROL_CHECK"><![CDATA[ISDOCCONTROLLED IN ('Y', 'N')]]></check>
-      <check name="CELEMVAL_ISFORCURREN_CHECK"><![CDATA[ISFOREIGNCURRENCY IN ('Y', 'N')]]></check>
-      <check name="CELEMVAL_POSTENCUMBR_CHECK"><![CDATA[POSTENCUMBRANCE IN ('Y', 'N')]]></check>
-      <check name="CELEMVAL_POSTSTATISTIC_CHECK"><![CDATA[POSTSTATISTICAL IN ('Y', 'N')]]></check>
-      <check name="CELEMVALUE_POSTACTUAL_CHECK"><![CDATA[POSTACTUAL IN ('Y', 'N')]]></check>
-      <check name="CELEMVALUE_POSTBUDGET_CHECK"><![CDATA[POSTBUDGET IN ('Y', 'N')]]></check>
+      <check name="C_ELEMENTVALUE_ISBANKACCOU_CHK"><![CDATA[ISBANKACCOUNT IN ('Y', 'N')]]></check>
+      <check name="C_ELEMENTVALUE_ISDOCCONTRO_CHK"><![CDATA[ISDOCCONTROLLED IN ('Y', 'N')]]></check>
+      <check name="C_ELEMENTVALUE_ISFOREIGNCU_CHK"><![CDATA[ISFOREIGNCURRENCY IN ('Y', 'N')]]></check>
+      <check name="C_ELEMENTVALUE_POSTACTUAL_CHK"><![CDATA[POSTACTUAL IN ('Y', 'N')]]></check>
+      <check name="C_ELEMENTVALUE_POSTBUDGET_CHK"><![CDATA[POSTBUDGET IN ('Y', 'N')]]></check>
+      <check name="C_ELEMENTVALUE_POSTENCUMBR_CHK"><![CDATA[POSTENCUMBRANCE IN ('Y', 'N')]]></check>
+      <check name="C_ELEMENTVALUE_POSTSTATIST_CHK"><![CDATA[POSTSTATISTICAL IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_ELEMENTVALUE_OPERAND.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_ELEMENTVALUE_OPERAND.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,18 +49,18 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CELEMENTVALUEOPERAND">
+      <foreign-key foreignTable="C_ELEMENTVALUE" name="C_ELEMENTVALUE_OPERAND_ACCOUNT">
+        <reference local="ACCOUNT_ID" foreign="C_ELEMENTVALUE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="C_ELEMENTVALUE_OPERAND_AD_CLIE">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CELEMENTVALUEOPERAND">
+      <foreign-key foreignTable="AD_ORG" name="C_ELEMENTVALUE_OPERAND_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ELEMENTVALUE" name="CELEMENTVALUE_CELEMENTVALUEOP1">
+      <foreign-key foreignTable="C_ELEMENTVALUE" name="C_ELEMENTVALUE_OPERAND_C_ELEME">
         <reference local="C_ELEMENTVALUE_ID" foreign="C_ELEMENTVALUE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ELEMENTVALUE" name="CELEMENTVALUE_CELEMENTVALUEOPE">
-        <reference local="ACCOUNT_ID" foreign="C_ELEMENTVALUE_ID"/>
-      </foreign-key>
-      <check name="CELEMENVOPER_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="C_ELEMENTVALUE_OPERAND_ISA_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_ELEMENTVALUE_TRL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_ELEMENTVALUE_TRL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -53,23 +53,23 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CELEMENTVALUETRL">
+      <foreign-key foreignTable="AD_CLIENT" name="C_ELEMENTVALUE_TRL_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_LANGUAGE" name="ADLANGUAGE_CELEMENTVALUETRL">
+      <foreign-key foreignTable="AD_LANGUAGE" name="C_ELEMENTVALUE_TRL_AD_LANGUAGE">
         <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CELEMENTVALUETRL">
+      <foreign-key foreignTable="AD_ORG" name="C_ELEMENTVALUE_TRL_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ELEMENTVALUE" name="CELEMENTVALUE_CEVALUETRL" onDelete="cascade">
+      <foreign-key foreignTable="C_ELEMENTVALUE" name="C_ELEMENTVALUE_TRL_C_ELEMENTVA" onDelete="cascade">
         <reference local="C_ELEMENTVALUE_ID" foreign="C_ELEMENTVALUE_ID"/>
       </foreign-key>
-      <unique name="CELEMENTVALUETRL_CELEMENTVA_UN">
+      <unique name="C_ELEMENTVALUE_TRL_ELEMENTV_UN">
         <unique-column name="C_ELEMENTVALUE_ID"/>
         <unique-column name="AD_LANGUAGE"/>
       </unique>
-      <check name="CELVALTRL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="CELVALTRL_ISTRANSLATED_CHECK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
+      <check name="C_ELEMENTVALUE_TRL_ISACTIV_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="C_ELEMENTVALUE_TRL_ISTRANS_CHK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_EXTERNALPOS.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_EXTERNALPOS.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -81,29 +81,29 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CEXTERNALPOS">
+      <foreign-key foreignTable="AD_CLIENT" name="C_EXTERNALPOS_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CEXTERNALPOS">
+      <foreign-key foreignTable="AD_ORG" name="C_EXTERNALPOS_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_USER" name="ADUSER_SR_C_EXTERNALPOS">
-        <reference local="SALESREP_ID" foreign="AD_USER_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_BPARTNER" name="BPARTNER_C_EXTERNALPOS">
+      <foreign-key foreignTable="C_BPARTNER" name="C_EXTERNALPOS_C_BPARTNER">
         <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_DOCTYPE" name="DOCTYPE_C_EXTERNALPOS">
+      <foreign-key foreignTable="C_DOCTYPE" name="C_EXTERNALPOS_C_DOCTYPE">
         <reference local="C_DOCTYPE_ID" foreign="C_DOCTYPE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="M_PRICELIST" name="PRICELIST_C_EXTERNALPOS">
+      <foreign-key foreignTable="M_PRICELIST" name="C_EXTERNALPOS_M_PRICELIST">
         <reference local="M_PRICELIST_ID" foreign="M_PRICELIST_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="M_SHIPPER" name="SHIPPER_C_EXTERNALPOS">
+      <foreign-key foreignTable="M_SHIPPER" name="C_EXTERNALPOS_M_SHIPPER">
         <reference local="M_SHIPPER_ID" foreign="M_SHIPPER_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="M_WAREHOUSE" name="WAREHOUSE_C_EXTERNALPOS">
+      <foreign-key foreignTable="M_WAREHOUSE" name="C_EXTERNALPOS_M_WAREHOUSE">
         <reference local="M_WAREHOUSE_ID" foreign="M_WAREHOUSE_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_USER" name="C_EXTERNALPOS_SALESREP">
+        <reference local="SALESREP_ID" foreign="AD_USER_ID"/>
+      </foreign-key>
     </table>
   </database>
--- a/src-db/database/model/tables/C_EXTERNALPOS_CATEGORY.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_EXTERNALPOS_CATEGORY.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -41,16 +41,16 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CEXTERNALPOSCATEGORY">
+      <foreign-key foreignTable="AD_CLIENT" name="C_EXTERNALPOS_CATEGORY_AD_CLIE">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CEXTERNALPOSCATEGORY">
+      <foreign-key foreignTable="AD_ORG" name="C_EXTERNALPOS_CATEGORY_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_EXTERNALPOS" name="CEXTPOS_C_EXTERNALPOS_CAT">
+      <foreign-key foreignTable="C_EXTERNALPOS" name="C_EXTERNALPOS_CATEGORY_C_EXTER">
         <reference local="C_EXTERNALPOS_ID" foreign="C_EXTERNALPOS_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="M_PRODUCT_CATEGORY" name="PRODCATE_C_EXTERNALPOS_CAT">
+      <foreign-key foreignTable="M_PRODUCT_CATEGORY" name="C_EXTERNALPOS_CATEGORY_M_PRODU">
         <reference local="M_PRODUCT_CATEGORY_ID" foreign="M_PRODUCT_CATEGORY_ID"/>
       </foreign-key>
       <unique name="C_EXTPOSCAT_PRODCATEGORY_UN">
--- a/src-db/database/model/tables/C_EXTERNALPOS_PRODUCT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_EXTERNALPOS_PRODUCT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -41,13 +41,13 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CEXTERNALPOSPRODUCT">
+      <foreign-key foreignTable="AD_CLIENT" name="C_EXTERNALPOS_PRODUCT_AD_CLIEN">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CEXTERNALPOSPRODUCT">
+      <foreign-key foreignTable="AD_ORG" name="C_EXTERNALPOS_PRODUCT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_EXTERNALPOS" name="EXTPOS_C_EXTERNALPOS_PROD">
+      <foreign-key foreignTable="C_EXTERNALPOS" name="C_EXTERNALPOS_PRODUCT_C_EXTERN">
         <reference local="C_EXTERNALPOS_ID" foreign="C_EXTERNALPOS_ID"/>
       </foreign-key>
       <foreign-key foreignTable="M_PRODUCT" name="M_PRODUCT_C_EXTERNALPOS_PROD">
--- a/src-db/database/model/tables/C_FILE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_FILE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -57,13 +57,13 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CFILE">
+      <foreign-key foreignTable="AD_CLIENT" name="C_FILE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CFILE">
+      <foreign-key foreignTable="AD_ORG" name="C_FILE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_TABLE" name="ADTABLE_CFILE" onDelete="cascade">
+      <foreign-key foreignTable="AD_TABLE" name="C_FILE_AD_TABLE" onDelete="cascade">
         <reference local="AD_TABLE_ID" foreign="AD_TABLE_ID"/>
       </foreign-key>
     </table>
--- a/src-db/database/model/tables/C_GLITEM.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_GLITEM.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -53,16 +53,16 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CGLITEM">
+      <foreign-key foreignTable="AD_CLIENT" name="C_GLITEM_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CGLITEM">
+      <foreign-key foreignTable="AD_ORG" name="C_GLITEM_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_TAX" name="CTAX_CGLITEM">
+      <foreign-key foreignTable="C_TAX" name="C_GLITEM_C_TAX">
         <reference local="C_TAX_ID" foreign="C_TAX_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_WITHHOLDING" name="CWITHHOLDING_CGLITEM">
+      <foreign-key foreignTable="C_WITHHOLDING" name="C_GLITEM_C_WITHHOLDING">
         <reference local="C_WITHHOLDING_ID" foreign="C_WITHHOLDING_ID"/>
       </foreign-key>
       <check name="C_GLITEM_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
--- a/src-db/database/model/tables/C_GLITEM_ACCT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_GLITEM_ACCT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,25 +49,25 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CGLITEMACCT">
+      <foreign-key foreignTable="AD_CLIENT" name="C_GLITEM_ACCT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CGLITEMACCT">
+      <foreign-key foreignTable="AD_ORG" name="C_GLITEM_ACCT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ACCTSCHEMA" name="CACCTSCHEMA_CGLITEMACCT" onDelete="cascade">
+      <foreign-key foreignTable="C_ACCTSCHEMA" name="C_GLITEM_ACCT_C_ACCTSCHEMA" onDelete="cascade">
         <reference local="C_ACCTSCHEMA_ID" foreign="C_ACCTSCHEMA_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_GLITEM" name="CGLITEM_CGLITEMACCT">
+      <foreign-key foreignTable="C_GLITEM" name="C_GLITEM_ACCT_C_GLITEM">
         <reference local="C_GLITEM_ID" foreign="C_GLITEM_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="GLITEMCREDITACCT_CGLITEMACCT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_GLITEM_ACCT_GLITEM_CREDIT_AC">
         <reference local="GLITEM_CREDIT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="GLITEMDEBITACCT_CGLITEMACCT">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_GLITEM_ACCT_GLITEM_DEBIT_ACC">
         <reference local="GLITEM_DEBIT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <unique name="CGLITEMACCT_CGLITEMID_CACCT_UN">
+      <unique name="C_GLITEM_ACCT_GLITEM_ACCTSC_UN">
         <unique-column name="C_GLITEM_ID"/>
         <unique-column name="C_ACCTSCHEMA_ID"/>
       </unique>
--- a/src-db/database/model/tables/C_GREETING.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_GREETING.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,14 +49,14 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CGREETING">
+      <foreign-key foreignTable="AD_CLIENT" name="C_GREETING_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CGREETING">
+      <foreign-key foreignTable="AD_ORG" name="C_GREETING_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
       <check name="C_GREETING_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
       <check name="C_GREETING_ISDEFAULT_CHECK"><![CDATA[ISDEFAULT IN ('Y', 'N')]]></check>
-      <check name="CGREET_ISFIRSTNAMEONLY_CHECK"><![CDATA[ISFIRSTNAMEONLY IN ('Y', 'N')]]></check>
+      <check name="C_GREETING_ISFIRSTNAMEONLY_CHK"><![CDATA[ISFIRSTNAMEONLY IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_GREETING_TRL.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_GREETING_TRL.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -53,16 +53,16 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CGREETINGTRL">
+      <foreign-key foreignTable="AD_CLIENT" name="C_GREETING_TRL_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_LANGUAGE" name="ADLANGUAGE_CGREETINGTRL">
+      <foreign-key foreignTable="AD_LANGUAGE" name="C_GREETING_TRL_AD_LANGUAGE">
         <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CGREETINGTRL">
+      <foreign-key foreignTable="AD_ORG" name="C_GREETING_TRL_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_GREETING" name="CGREETING_CGREETINGTRL" onDelete="cascade">
+      <foreign-key foreignTable="C_GREETING" name="C_GREETING_TRL_C_GREETING" onDelete="cascade">
         <reference local="C_GREETING_ID" foreign="C_GREETING_ID"/>
       </foreign-key>
       <index name="C_GREETING_TRL_UN_KEY" unique="true">
@@ -70,6 +70,6 @@
         <index-column name="AD_LANGUAGE"/>
       </index>
       <check name="C_GREETING_TRL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="CGREET_TRL_ISTRANSLATED_CHECK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
+      <check name="C_GREETING_TRL_ISTRANSLATE_CHK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_INCOTERMS.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_INCOTERMS.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,14 +49,14 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_C_INCOTERMS">
+      <foreign-key foreignTable="AD_CLIENT" name="C_INCOTERMS_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_C_INCOTERMS">
+      <foreign-key foreignTable="AD_ORG" name="C_INCOTERMS_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
       <check name="C_INCOTERMS_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
       <check name="C_INCOTERMS_ISDELIVERY_CHECK"><![CDATA[ISDELIVERY IN ('Y', 'N')]]></check>
-      <check name="CINCOTERM_REQUIRDESCR_CHECK"><![CDATA[REQUIRESDESCRIPTION IN ('Y', 'N')]]></check>
+      <check name="C_INCOTERMS_REQUIRESDESCRI_CHK"><![CDATA[REQUIRESDESCRIPTION IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_INTERORG_ACCT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_INTERORG_ACCT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,25 +49,25 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CINTERORGACCT">
+      <foreign-key foreignTable="AD_CLIENT" name="C_INTERORG_ACCT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CINTERORGACCT">
+      <foreign-key foreignTable="AD_ORG" name="C_INTERORG_ACCT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORGTO_CINTERORGACCT">
+      <foreign-key foreignTable="AD_ORG" name="C_INTERORG_ACCT_AD_ORGTO">
         <reference local="AD_ORGTO_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ACCTSCHEMA" name="CACCTSCHEMA_CINTERORGACCT" onDelete="cascade">
+      <foreign-key foreignTable="C_ACCTSCHEMA" name="C_INTERORG_ACCT_C_ACCTSCHEMA" onDelete="cascade">
         <reference local="C_ACCTSCHEMA_ID" foreign="C_ACCTSCHEMA_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_INTERCOMPANYDUEFROM_CINTERO">
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_INTERORG_ACCT_INTERCOMPANYD1">
+        <reference local="INTERCOMPANYDUETO_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_INTERORG_ACCT_INTERCOMPANYDU">
         <reference local="INTERCOMPANYDUEFROM_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_INTERCOMPANYDUETO_CINTERORG">
-        <reference local="INTERCOMPANYDUETO_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
-      </foreign-key>
-      <unique name="CINTERORGACCT_CACCTSCHEMAID_UN">
+      <unique name="C_INTERORG_ACCT_ACCTSCHEMA__UN">
         <unique-column name="C_ACCTSCHEMA_ID"/>
         <unique-column name="AD_ORG_ID"/>
         <unique-column name="AD_ORGTO_ID"/>
--- a/src-db/database/model/tables/C_INVOICE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_INVOICE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -209,59 +209,87 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CINVOICE">
+      <column name="ISPAID" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[N]]></default>
+        <onCreateDefault><![CDATA['N']]></onCreateDefault>
+      </column>
+      <column name="TOTALPAID" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
+        <default><![CDATA[0]]></default>
+        <onCreateDefault><![CDATA[0]]></onCreateDefault>
+      </column>
+      <column name="OUTSTANDINGAMT" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
+        <default><![CDATA[0]]></default>
+        <onCreateDefault><![CDATA[0]]></onCreateDefault>
+      </column>
+      <column name="DAYSTILLDUE" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
+        <default><![CDATA[0]]></default>
+        <onCreateDefault><![CDATA[0]]></onCreateDefault>
+      </column>
+      <column name="DUEAMT" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
+        <default><![CDATA[0]]></default>
+        <onCreateDefault><![CDATA[0]]></onCreateDefault>
+      </column>
+      <column name="LASTCALCULATEDONDATE" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="UPDATEPAYMENTMONITOR" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[N]]></default>
+        <onCreateDefault><![CDATA['N']]></onCreateDefault>
+      </column>
+      <foreign-key foreignTable="C_BPARTNER_LOCATION" name="C_BPLOCATION_CINVOICE">
+        <reference local="C_BPARTNER_LOCATION_ID" foreign="C_BPARTNER_LOCATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="C_INVOICE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CINVOICE">
+      <foreign-key foreignTable="AD_ORG" name="C_INVOICE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORGTRX_CINVOICE">
+      <foreign-key foreignTable="AD_ORG" name="C_INVOICE_AD_ORGTRX">
         <reference local="AD_ORGTRX_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_USER" name="ADUSER_CINVOICE">
+      <foreign-key foreignTable="AD_USER" name="C_INVOICE_AD_USER">
         <reference local="AD_USER_ID" foreign="AD_USER_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_USER" name="ADUSER_SR_CINVOICE">
-        <reference local="SALESREP_ID" foreign="AD_USER_ID"/>
+      <foreign-key foreignTable="C_ACTIVITY" name="C_INVOICE_C_ACTIVITY">
+        <reference local="C_ACTIVITY_ID" foreign="C_ACTIVITY_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BPARTNER_LOCATION" name="C_BPLOCATION_CINVOICE">
-        <reference local="C_BPARTNER_LOCATION_ID" foreign="C_BPARTNER_LOCATION_ID"/>
+      <foreign-key foreignTable="C_BPARTNER" name="C_INVOICE_C_BPARTNER">
+        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_CAMPAIGN" name="C_INVOICE_C_CAMPAIGN">
+        <reference local="C_CAMPAIGN_ID" foreign="C_CAMPAIGN_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_CHARGE" name="C_INVOICE_C_CHARGE">
+        <reference local="C_CHARGE_ID" foreign="C_CHARGE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_CURRENCY" name="C_INVOICE_C_CURRENCY">
+        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_DOCTYPE" name="C_INVOICE_C_DOCTYPE">
+        <reference local="C_DOCTYPE_ID" foreign="C_DOCTYPE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_DOCTYPE" name="C_INVOICE_C_DOCTYPETARGET">
+        <reference local="C_DOCTYPETARGET_ID" foreign="C_DOCTYPE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_ORDER" name="C_INVOICE_C_ORDER">
+        <reference local="C_ORDER_ID" foreign="C_ORDER_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_PAYMENTTERM" name="C_INVOICE_C_PAYMENTTERM">
+        <reference local="C_PAYMENTTERM_ID" foreign="C_PAYMENTTERM_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_PROJECT" name="C_INVOICE_C_PROJECT">
+        <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
       </foreign-key>
       <foreign-key foreignTable="C_WITHHOLDING" name="C_INVOICE_C_WITHHOLDING">
         <reference local="C_WITHHOLDING_ID" foreign="C_WITHHOLDING_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ACTIVITY" name="CACTIVITY_CINVOICE">
-        <reference local="C_ACTIVITY_ID" foreign="C_ACTIVITY_ID"/>
+      <foreign-key foreignTable="M_PRICELIST" name="C_INVOICE_M_PRICELIST">
+        <reference local="M_PRICELIST_ID" foreign="M_PRICELIST_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BPARTNER" name="CBPARTNER_CINVOICE">
-        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_CAMPAIGN" name="CCAMPAIGN_CINVOICE">
-        <reference local="C_CAMPAIGN_ID" foreign="C_CAMPAIGN_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_CHARGE" name="CCHARGE_CINVOICE">
-        <reference local="C_CHARGE_ID" foreign="C_CHARGE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_CURRENCY" name="CCURRENCY_CINVOICE">
-        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_DOCTYPE" name="CDOCTYPE_CINVOICE">
-        <reference local="C_DOCTYPE_ID" foreign="C_DOCTYPE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_DOCTYPE" name="CDOCTYPETARGET_CINVOICE">
-        <reference local="C_DOCTYPETARGET_ID" foreign="C_DOCTYPE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_ORDER" name="CORDER_CINVOICE">
-        <reference local="C_ORDER_ID" foreign="C_ORDER_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_PAYMENTTERM" name="CPAYMENTTERM_CINVOICE">
-        <reference local="C_PAYMENTTERM_ID" foreign="C_PAYMENTTERM_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_PROJECT" name="CPROJECT_CINVOICE">
-        <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="M_PRICELIST" name="MPRICELIST_CINVOICE">
-        <reference local="M_PRICELIST_ID" foreign="M_PRICELIST_ID"/>
+      <foreign-key foreignTable="AD_USER" name="C_INVOICE_SALESREP">
+        <reference local="SALESREP_ID" foreign="AD_USER_ID"/>
       </foreign-key>
       <index name="C_INVOICE_BPARTNER" unique="false">
         <index-column name="C_BPARTNER_ID"/>
@@ -281,10 +309,10 @@
       <check name="C_INVOICE_CREATEFROM_CHECK"><![CDATA[CREATEFROM IN ('Y', 'N')]]></check>
       <check name="C_INVOICE_GENERATETO_CHECK"><![CDATA[GENERATETO IN ('Y', 'N')]]></check>
       <check name="C_INVOICE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="C_INVOICE_ISDISCOUNTPRINTE_CHK"><![CDATA[ISDISCOUNTPRINTED IN ('Y', 'N')]]></check>
       <check name="C_INVOICE_ISPRINTED_CHECK"><![CDATA[ISPRINTED IN ('Y', 'N')]]></check>
       <check name="C_INVOICE_ISSOTRX_CHECK"><![CDATA[ISSOTRX IN ('Y', 'N')]]></check>
       <check name="C_INVOICE_ISTAXINCLUDED_CHECK"><![CDATA[ISTAXINCLUDED IN ('Y', 'N')]]></check>
       <check name="C_INVOICE_PROCESSED_CHECK"><![CDATA[PROCESSED IN ('Y', 'N')]]></check>
-      <check name="CINV_ISDISCOUNTPRINT_CHECK"><![CDATA[ISDISCOUNTPRINTED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_INVOICELINE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_INVOICELINE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -137,49 +137,49 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CINVOICELINE">
+      <foreign-key foreignTable="AD_CLIENT" name="C_INVOICELINE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CINVOICELINE">
+      <foreign-key foreignTable="AD_ORG" name="C_INVOICELINE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_CHARGE" name="CCHARGE_CINVOICELINE">
+      <foreign-key foreignTable="C_CHARGE" name="C_INVOICELINE_C_CHARGE">
         <reference local="C_CHARGE_ID" foreign="C_CHARGE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_INVOICE" name="CINVOICE_CINVOICELINE">
+      <foreign-key foreignTable="C_INVOICE" name="C_INVOICELINE_C_INVOICE">
         <reference local="C_INVOICE_ID" foreign="C_INVOICE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_INVOICE_DISCOUNT" name="CINVOICELINE_FK_DISCINVOICE">
+      <foreign-key foreignTable="C_INVOICE_DISCOUNT" name="C_INVOICELINE_C_INVOICE_DISCOU">
         <reference local="C_INVOICE_DISCOUNT_ID" foreign="C_INVOICE_DISCOUNT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ORDERLINE" name="CORDERLINE_CINVOICELINE">
+      <foreign-key foreignTable="C_ORDERLINE" name="C_INVOICELINE_C_ORDERLINE">
         <reference local="C_ORDERLINE_ID" foreign="C_ORDERLINE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_TAX" name="CTAX_CINVOICELINE">
+      <foreign-key foreignTable="C_PROJECTLINE" name="C_INVOICELINE_C_PROJECTLINE">
+        <reference local="C_PROJECTLINE_ID" foreign="C_PROJECTLINE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_TAX" name="C_INVOICELINE_C_TAX">
         <reference local="C_TAX_ID" foreign="C_TAX_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_UOM" name="CUOM_CINVOICELINE">
+      <foreign-key foreignTable="C_UOM" name="C_INVOICELINE_C_UOM">
         <reference local="C_UOM_ID" foreign="C_UOM_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="M_ATTRIBUTESETINSTANCE" name="MATTRSETINST_CINVOICELINE">
+      <foreign-key foreignTable="M_ATTRIBUTESETINSTANCE" name="C_INVOICELINE_M_ATTRIBUTESETIN">
         <reference local="M_ATTRIBUTESETINSTANCE_ID" foreign="M_ATTRIBUTESETINSTANCE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="M_INOUTLINE" name="MINOUTLINE_CINVOICELINE" onDelete="setnull">
+      <foreign-key foreignTable="M_INOUTLINE" name="C_INVOICELINE_M_INOUTLINE" onDelete="setnull">
         <reference local="M_INOUTLINE_ID" foreign="M_INOUTLINE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="M_OFFER" name="MOFFER_CINVOICELINE">
+      <foreign-key foreignTable="M_OFFER" name="C_INVOICELINE_M_OFFER">
         <reference local="M_OFFER_ID" foreign="M_OFFER_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="M_PRODUCT" name="MPRODUCT_CINVOICELINE">
+      <foreign-key foreignTable="M_PRODUCT" name="C_INVOICELINE_M_PRODUCT">
         <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="M_PRODUCT_UOM" name="MPRODUCTUOMID_CINVOICELINE">
+      <foreign-key foreignTable="M_PRODUCT_UOM" name="C_INVOICELINE_M_PRODUCT_UOM">
         <reference local="M_PRODUCT_UOM_ID" foreign="M_PRODUCT_UOM_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_PROJECTLINE" name="PROJECTLINE_CINVOICELINE">
-        <reference local="C_PROJECTLINE_ID" foreign="C_PROJECTLINE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="S_RESOURCEASSIGNMENT" name="SRESOURCEASSIGN_CINVOICELINE">
+      <foreign-key foreignTable="S_RESOURCEASSIGNMENT" name="C_INVOICELINE_S_RESOURCEASSIGN">
         <reference local="S_RESOURCEASSIGNMENT_ID" foreign="S_RESOURCEASSIGNMENT_ID"/>
       </foreign-key>
       <index name="C_INVOICELINE_INOUTLINE" unique="false">
--- a/src-db/database/model/tables/C_INVOICELINE_ACCTDIMENSION.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_INVOICELINE_ACCTDIMENSION.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -57,12 +57,6 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CINVOICELINEACCTDIMEN">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CINVOICELINEACCTDIMENSIO">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
       <foreign-key foreignTable="C_CAMPAIGN" name="C_INVOICELINE_ACCTD_FK_CAMP">
         <reference local="C_CAMPAIGN_ID" foreign="C_CAMPAIGN_ID"/>
       </foreign-key>
@@ -72,5 +66,11 @@
       <foreign-key foreignTable="C_PROJECT" name="C_INVOICELINE_ACCTD_FK_PROJECT">
         <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="C_INVOICELINE_ACCTDIMENSION_A1">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="C_INVOICELINE_ACCTDIMENSION_AD">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
     </table>
   </database>
--- a/src-db/database/model/tables/C_INVOICELINE_OFFER.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_INVOICELINE_OFFER.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -53,16 +53,16 @@
         <default><![CDATA[0]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CINVOICELINEOFFER">
+      <foreign-key foreignTable="AD_CLIENT" name="C_INVOICELINE_OFFER_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CINVOICELINEOFFER">
+      <foreign-key foreignTable="AD_ORG" name="C_INVOICELINE_OFFER_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_INVOICELINE" name="CINVOICELINE_CINVOICELINEOFFER" onDelete="cascade">
+      <foreign-key foreignTable="C_INVOICELINE" name="C_INVOICELINE_OFFER_C_INVOICEL" onDelete="cascade">
         <reference local="C_INVOICELINE_ID" foreign="C_INVOICELINE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="M_OFFER" name="MOFFER_CINVOICELINEOFFER">
+      <foreign-key foreignTable="M_OFFER" name="C_INVOICELINE_OFFER_M_OFFER">
         <reference local="M_OFFER_ID" foreign="M_OFFER_ID"/>
       </foreign-key>
     </table>
--- a/src-db/database/model/tables/C_INVOICESCHEDULE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_INVOICESCHEDULE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -77,14 +77,14 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CINVOICESCHEDULE">
+      <foreign-key foreignTable="AD_CLIENT" name="C_INVOICESCHEDULE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CINVOICESCHEDULE">
+      <foreign-key foreignTable="AD_ORG" name="C_INVOICESCHEDULE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <check name="CINVOICESCHED_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="CINVOICESCHED_ISAMOUNT_CHECK"><![CDATA[ISAMOUNT IN ('Y', 'N')]]></check>
-      <check name="CINVSCHED_EVENINVWEEK_CHECK"><![CDATA[EVENINVOICEWEEK IN ('Y', 'N')]]></check>
+      <check name="C_INVOICESCHEDULE_EVENINVO_CHK"><![CDATA[EVENINVOICEWEEK IN ('Y', 'N')]]></check>
+      <check name="C_INVOICESCHEDULE_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="C_INVOICESCHEDULE_ISAMOUNT_CHK"><![CDATA[ISAMOUNT IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_INVOICETAX.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_INVOICETAX.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -57,16 +57,16 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CINVOICETAX">
+      <foreign-key foreignTable="AD_CLIENT" name="C_INVOICETAX_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CINVOICETAX">
+      <foreign-key foreignTable="AD_ORG" name="C_INVOICETAX_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_INVOICE" name="CINVOICE_CINVOICETAX">
+      <foreign-key foreignTable="C_INVOICE" name="C_INVOICETAX_C_INVOICE">
         <reference local="C_INVOICE_ID" foreign="C_INVOICE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_TAX" name="CTAX_CINVOICETAX">
+      <foreign-key foreignTable="C_TAX" name="C_INVOICETAX_C_TAX">
         <reference local="C_TAX_ID" foreign="C_TAX_ID"/>
       </foreign-key>
       <index name="C_INVOICETAX_INVOICEID" unique="false">
--- a/src-db/database/model/tables/C_INVOICE_DISCOUNT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_INVOICE_DISCOUNT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,16 +49,16 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="CINVOICEDISC_FK_ADCLIENT">
+      <foreign-key foreignTable="AD_CLIENT" name="C_INVOICE_DISCOUNT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="CINVOICEDISC_FK_ADORG">
+      <foreign-key foreignTable="AD_ORG" name="C_INVOICE_DISCOUNT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_DISCOUNT" name="CINVOICEDISC_FK_CDISCOUNT">
+      <foreign-key foreignTable="C_DISCOUNT" name="C_INVOICE_DISCOUNT_C_DISCOUNT">
         <reference local="C_DISCOUNT_ID" foreign="C_DISCOUNT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_INVOICE" name="CINVOICEDISC_FK_CINVOICE">
+      <foreign-key foreignTable="C_INVOICE" name="C_INVOICE_DISCOUNT_C_INVOICE">
         <reference local="C_INVOICE_ID" foreign="C_INVOICE_ID"/>
       </foreign-key>
     </table>
--- a/src-db/database/model/tables/C_INVOICE_REVERSE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_INVOICE_REVERSE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -41,16 +41,16 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="CINVOICEREV_FK_ADCLIENT">
+      <foreign-key foreignTable="AD_CLIENT" name="C_INVOICE_REVERSE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="CINVOICEREV_FK_ADORG">
+      <foreign-key foreignTable="AD_ORG" name="C_INVOICE_REVERSE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_INVOICE" name="CINVOICEREV_FK_CINVOICE">
+      <foreign-key foreignTable="C_INVOICE" name="C_INVOICE_REVERSE_C_INVOICE">
         <reference local="C_INVOICE_ID" foreign="C_INVOICE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_INVOICE" name="CINVOICEREV_FK_CREVINVOICE">
+      <foreign-key foreignTable="C_INVOICE" name="C_INVOICE_REVERSE_REVERSED_C_I">
         <reference local="REVERSED_C_INVOICE_ID" foreign="C_INVOICE_ID"/>
       </foreign-key>
     </table>
--- a/src-db/database/model/tables/C_LOCATION.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_LOCATION.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -69,21 +69,21 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CLOCATION">
+      <foreign-key foreignTable="C_COUNTRY" name="C_COUNTRY_LOCATION">
+        <reference local="C_COUNTRY_ID" foreign="C_COUNTRY_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="C_LOCATION_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CLOCATION">
+      <foreign-key foreignTable="AD_ORG" name="C_LOCATION_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_COUNTRY" name="C_COUNTRY_LOCATION">
-        <reference local="C_COUNTRY_ID" foreign="C_COUNTRY_ID"/>
+      <foreign-key foreignTable="C_CITY" name="C_LOCATION_C_CITY">
+        <reference local="C_CITY_ID" foreign="C_CITY_ID"/>
       </foreign-key>
       <foreign-key foreignTable="C_REGION" name="C_REGION_LOCATION">
         <reference local="C_REGION_ID" foreign="C_REGION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_CITY" name="CCITY_CLOCATION">
-        <reference local="C_CITY_ID" foreign="C_CITY_ID"/>
-      </foreign-key>
       <check name="C_LOCATION_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_ORDER.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_ORDER.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -269,78 +269,78 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CORDER">
+      <foreign-key foreignTable="C_DOCTYPE" name="C_DOCTYPE_CORDER">
+        <reference local="C_DOCTYPE_ID" foreign="C_DOCTYPE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="C_ORDER_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CORDER">
+      <foreign-key foreignTable="AD_ORG" name="C_ORDER_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORGTRX_CORDER">
+      <foreign-key foreignTable="AD_ORG" name="C_ORDER_AD_ORGTRX">
         <reference local="AD_ORGTRX_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_USER" name="ADUSER_CORDER">
+      <foreign-key foreignTable="AD_USER" name="C_ORDER_AD_USER">
         <reference local="AD_USER_ID" foreign="AD_USER_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_USER" name="ADUSER_SR_CORDER">
-        <reference local="SALESREP_ID" foreign="AD_USER_ID"/>
+      <foreign-key foreignTable="C_BPARTNER_LOCATION" name="C_ORDER_BILLTO">
+        <reference local="BILLTO_ID" foreign="C_BPARTNER_LOCATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_USER" name="ADUSERDROPSHIP_CORDER">
-        <reference local="DROPSHIP_USER_ID" foreign="AD_USER_ID"/>
+      <foreign-key foreignTable="C_ACTIVITY" name="C_ORDER_C_ACTIVITY">
+        <reference local="C_ACTIVITY_ID" foreign="C_ACTIVITY_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_DOCTYPE" name="C_DOCTYPE_CORDER">
-        <reference local="C_DOCTYPE_ID" foreign="C_DOCTYPE_ID"/>
+      <foreign-key foreignTable="C_BPARTNER" name="C_ORDER_C_BPARTNER">
+        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
       </foreign-key>
       <foreign-key foreignTable="C_BPARTNER_LOCATION" name="C_ORDER_C_BPARTNER_LOCATION">
         <reference local="DELIVERY_LOCATION_ID" foreign="C_BPARTNER_LOCATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ACTIVITY" name="CACTIVITY_CORDER">
-        <reference local="C_ACTIVITY_ID" foreign="C_ACTIVITY_ID"/>
+      <foreign-key foreignTable="C_BPARTNER_LOCATION" name="C_ORDER_C_BPARTNER_LOCATION1">
+        <reference local="C_BPARTNER_LOCATION_ID" foreign="C_BPARTNER_LOCATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BPARTNER" name="CBPARTNER_CORDER">
-        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
+      <foreign-key foreignTable="C_CAMPAIGN" name="C_ORDER_C_CAMPAIGN">
+        <reference local="C_CAMPAIGN_ID" foreign="C_CAMPAIGN_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BPARTNER" name="CBPARTNERDROPSHIP_CORDER">
+      <foreign-key foreignTable="C_CHARGE" name="C_ORDER_C_CHARGE">
+        <reference local="C_CHARGE_ID" foreign="C_CHARGE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_CURRENCY" name="C_ORDER_C_CURRENCY">
+        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_DOCTYPE" name="C_ORDER_C_DOCTYPETARGET">
+        <reference local="C_DOCTYPETARGET_ID" foreign="C_DOCTYPE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_INCOTERMS" name="C_ORDER_C_INCOTERMS">
+        <reference local="C_INCOTERMS_ID" foreign="C_INCOTERMS_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_PAYMENTTERM" name="C_ORDER_C_PAYMENTTERM">
+        <reference local="C_PAYMENTTERM_ID" foreign="C_PAYMENTTERM_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_PROJECT" name="C_ORDER_C_PROJECT">
+        <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_BPARTNER" name="C_ORDER_DROPSHIP_BPARTNER">
         <reference local="DROPSHIP_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BPARTNER_LOCATION" name="CBPARTNERLOCATION_SOHEADER">
-        <reference local="C_BPARTNER_LOCATION_ID" foreign="C_BPARTNER_LOCATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_BPARTNER_LOCATION" name="CBPLOCATIONBILLTO_SOHEADER">
-        <reference local="BILLTO_ID" foreign="C_BPARTNER_LOCATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_BPARTNER_LOCATION" name="CBPLOCATIONDROPSHIP_CORDER">
+      <foreign-key foreignTable="C_BPARTNER_LOCATION" name="C_ORDER_DROPSHIP_LOCATION">
         <reference local="DROPSHIP_LOCATION_ID" foreign="C_BPARTNER_LOCATION_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_CAMPAIGN" name="CCAMPAIGN_CORDER">
-        <reference local="C_CAMPAIGN_ID" foreign="C_CAMPAIGN_ID"/>
+      <foreign-key foreignTable="AD_USER" name="C_ORDER_DROPSHIP_USER">
+        <reference local="DROPSHIP_USER_ID" foreign="AD_USER_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_CHARGE" name="CCHARGE_CORDER">
-        <reference local="C_CHARGE_ID" foreign="C_CHARGE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_CURRENCY" name="CCURRENCY_CORDER">
-        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_DOCTYPE" name="CDOCTYPETARGET_CORDER">
-        <reference local="C_DOCTYPETARGET_ID" foreign="C_DOCTYPE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_INCOTERMS" name="CORDER_CINCOTEMRS">
-        <reference local="C_INCOTERMS_ID" foreign="C_INCOTERMS_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_PAYMENTTERM" name="CPAYMENTTERM_SOHEADER">
-        <reference local="C_PAYMENTTERM_ID" foreign="C_PAYMENTTERM_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_PROJECT" name="CPROJECT_CORDER">
-        <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="M_PRICELIST" name="MPRICELIST_SOHEADER">
+      <foreign-key foreignTable="M_PRICELIST" name="C_ORDER_M_PRICELIST">
         <reference local="M_PRICELIST_ID" foreign="M_PRICELIST_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="M_SHIPPER" name="MSHIPPER_CORDER">
+      <foreign-key foreignTable="M_SHIPPER" name="C_ORDER_M_SHIPPER">
         <reference local="M_SHIPPER_ID" foreign="M_SHIPPER_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="M_WAREHOUSE" name="MWAREHOUSE_CORDER">
+      <foreign-key foreignTable="M_WAREHOUSE" name="C_ORDER_M_WAREHOUSE">
         <reference local="M_WAREHOUSE_ID" foreign="M_WAREHOUSE_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_USER" name="C_ORDER_SALESREP">
+        <reference local="SALESREP_ID" foreign="AD_USER_ID"/>
+      </foreign-key>
       <index name="C_ORDER_BPARTNER" unique="false">
         <index-column name="C_BPARTNER_ID"/>
       </index>
@@ -358,12 +358,12 @@
       </index>
       <check name="C_ORDER_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
       <check name="C_ORDER_ISDELIVERED_CHECK"><![CDATA[ISDELIVERED IN ('Y', 'N')]]></check>
+      <check name="C_ORDER_ISDISCOUNTPRINTED_CHK"><![CDATA[ISDISCOUNTPRINTED IN ('Y', 'N')]]></check>
       <check name="C_ORDER_ISINVOICED_CHECK"><![CDATA[ISINVOICED IN ('Y', 'N')]]></check>
       <check name="C_ORDER_ISPRINTED_CHECK"><![CDATA[ISPRINTED IN ('Y', 'N')]]></check>
       <check name="C_ORDER_ISSELECTED_CHECK"><![CDATA[ISSELECTED IN ('Y', 'N')]]></check>
       <check name="C_ORDER_ISSOTRX_CHECK"><![CDATA[ISSOTRX IN ('Y', 'N')]]></check>
       <check name="C_ORDER_ISTAXINCLUDED_CHECK"><![CDATA[ISTAXINCLUDED IN ('Y', 'N')]]></check>
       <check name="C_ORDER_PROCESSED_CHECK"><![CDATA[PROCESSED IN ('Y', 'N')]]></check>
-      <check name="CORDER_ISDISCOUNTPRINT_CHECK"><![CDATA[ISDISCOUNTPRINTED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_ORDERLINE.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_ORDERLINE.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -185,60 +185,60 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CORDERLINE">
+      <foreign-key foreignTable="AD_CLIENT" name="C_ORDERLINE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CORDERLINE">
+      <foreign-key foreignTable="AD_ORG" name="C_ORDERLINE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="C_BPARTNER" name="C_ORDERLINE_C_BPARTNER">
+        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_BPARTNER_LOCATION" name="C_ORDERLINE_C_BPARTNER_LOCATIO">
+        <reference local="C_BPARTNER_LOCATION_ID" foreign="C_BPARTNER_LOCATION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_CHARGE" name="C_ORDERLINE_C_CHARGE">
+        <reference local="C_CHARGE_ID" foreign="C_CHARGE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_CURRENCY" name="C_ORDERLINE_C_CURRENCY">
+        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_ORDER" name="C_ORDERLINE_C_ORDER">
+        <reference local="C_ORDER_ID" foreign="C_ORDER_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_ORDER_DISCOUNT" name="C_ORDERLINE_C_ORDER_DISCOUNT">
+        <reference local="C_ORDER_DISCOUNT_ID" foreign="C_ORDER_DISCOUNT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_TAX" name="C_ORDERLINE_C_TAX">
+        <reference local="C_TAX_ID" foreign="C_TAX_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_UOM" name="C_ORDERLINE_C_UOM">
+        <reference local="C_UOM_ID" foreign="C_UOM_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="M_ATTRIBUTESETINSTANCE" name="C_ORDERLINE_M_ATTRIBUTESETINST">
+        <reference local="M_ATTRIBUTESETINSTANCE_ID" foreign="M_ATTRIBUTESETINSTANCE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="M_OFFER" name="C_ORDERLINE_M_OFFER">
+        <reference local="M_OFFER_ID" foreign="M_OFFER_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="M_PRODUCT" name="C_ORDERLINE_M_PRODUCT">
+        <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="M_PRODUCT_UOM" name="C_ORDERLINE_M_PRODUCT_UOM">
+        <reference local="M_PRODUCT_UOM_ID" foreign="M_PRODUCT_UOM_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="M_SHIPPER" name="C_ORDERLINE_M_SHIPPER">
+        <reference local="M_SHIPPER_ID" foreign="M_SHIPPER_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="M_WAREHOUSE" name="C_ORDERLINE_M_WAREHOUSE">
+        <reference local="M_WAREHOUSE_ID" foreign="M_WAREHOUSE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="S_RESOURCEASSIGNMENT" name="C_ORDERLINE_S_RESOURCEASSIGNME">
+        <reference local="S_RESOURCEASSIGNMENT_ID" foreign="S_RESOURCEASSIGNMENT_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="C_ORDERLINE" name="C_ORDERLINE_SOPOREF">
         <reference local="REF_ORDERLINE_ID" foreign="C_ORDERLINE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_BPARTNER" name="CBPARTNER_SOLINE">
-        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_BPARTNER_LOCATION" name="CBPARTNERLOCATION_SOLINE">
-        <reference local="C_BPARTNER_LOCATION_ID" foreign="C_BPARTNER_LOCATION_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_CHARGE" name="CCHARGE_CORDERLINE">
-        <reference local="C_CHARGE_ID" foreign="C_CHARGE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_CURRENCY" name="CCURRENCY_CORDERLINE">
-        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_ORDER_DISCOUNT" name="CINORDERLINE_FK_DISCORDER">
-        <reference local="C_ORDER_DISCOUNT_ID" foreign="C_ORDER_DISCOUNT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_ORDER" name="CORDER_CORDERLINE">
-        <reference local="C_ORDER_ID" foreign="C_ORDER_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_TAX" name="CTAX_CORDERLINE">
-        <reference local="C_TAX_ID" foreign="C_TAX_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="C_UOM" name="CUOM_CORDERLINE">
-        <reference local="C_UOM_ID" foreign="C_UOM_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="M_ATTRIBUTESETINSTANCE" name="MATTRSETINST_CORDERLINE">
-        <reference local="M_ATTRIBUTESETINSTANCE_ID" foreign="M_ATTRIBUTESETINSTANCE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="M_OFFER" name="MOFFER_CORDERLINE">
-        <reference local="M_OFFER_ID" foreign="M_OFFER_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="M_PRODUCT" name="MPRODUCT_CORDERLINE">
-        <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="M_PRODUCT_UOM" name="MPRODUCTOUMID_CORDERLINE">
-        <reference local="M_PRODUCT_UOM_ID" foreign="M_PRODUCT_UOM_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="M_SHIPPER" name="MSHIPPER_CORDERLINE">
-        <reference local="M_SHIPPER_ID" foreign="M_SHIPPER_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="M_WAREHOUSE" name="MWAREHOUSE_CORDERLINE">
-        <reference local="M_WAREHOUSE_ID" foreign="M_WAREHOUSE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="S_RESOURCEASSIGNMENT" name="SRESOURCEASSIGN_CORDERLINE">
-        <reference local="S_RESOURCEASSIGNMENT_ID" foreign="S_RESOURCEASSIGNMENT_ID"/>
-      </foreign-key>
       <index name="C_ORDERLINE_ORDER" unique="false">
         <index-column name="C_ORDER_ID"/>
       </index>
--- a/src-db/database/model/tables/C_ORDERLINE_OFFER.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_ORDERLINE_OFFER.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -53,16 +53,16 @@
         <default><![CDATA[0]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CORDERLINEOFFER">
+      <foreign-key foreignTable="AD_CLIENT" name="C_ORDERLINE_OFFER_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CORDERLINEOFFER">
+      <foreign-key foreignTable="AD_ORG" name="C_ORDERLINE_OFFER_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ORDERLINE" name="CORDERLINE_CORDERLINEOFFER" onDelete="cascade">
+      <foreign-key foreignTable="C_ORDERLINE" name="C_ORDERLINE_OFFER_C_ORDERLINE" onDelete="cascade">
         <reference local="C_ORDERLINE_ID" foreign="C_ORDERLINE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="M_OFFER" name="MOFFER_CORDERLINEOFFER">
+      <foreign-key foreignTable="M_OFFER" name="C_ORDERLINE_OFFER_M_OFFER">
         <reference local="M_OFFER_ID" foreign="M_OFFER_ID"/>
       </foreign-key>
     </table>
--- a/src-db/database/model/tables/C_ORDERTAX.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_ORDERTAX.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -53,19 +53,19 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CORDERTAX">
+      <foreign-key foreignTable="AD_CLIENT" name="C_ORDERTAX_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CORDERTAX">
+      <foreign-key foreignTable="AD_ORG" name="C_ORDERTAX_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ORDER" name="CORDER_CORDERTAX">
+      <foreign-key foreignTable="C_ORDER" name="C_ORDERTAX_C_ORDER">
         <reference local="C_ORDER_ID" foreign="C_ORDER_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_TAX" name="CTAX_CORDERTAX">
+      <foreign-key foreignTable="C_TAX" name="C_ORDERTAX_C_TAX">
         <reference local="C_TAX_ID" foreign="C_TAX_ID"/>
       </foreign-key>
-      <unique name="CORDERTAX_CORDERID_CTAXID_UN">
+      <unique name="C_ORDERTAX_ORDER_TAX_UN">
         <unique-column name="C_ORDER_ID"/>
         <unique-column name="C_TAX_ID"/>
       </unique>
--- a/src-db/database/model/tables/C_ORDER_DISCOUNT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_ORDER_DISCOUNT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -49,16 +49,16 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="CORDERDISC_FK_ADCLIENT">
+      <foreign-key foreignTable="AD_CLIENT" name="C_ORDER_DISCOUNT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="CORDERDISC_FK_ADORG">
+      <foreign-key foreignTable="AD_ORG" name="C_ORDER_DISCOUNT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_DISCOUNT" name="CORDERDISC_FK_CDISCOUNT">
+      <foreign-key foreignTable="C_DISCOUNT" name="C_ORDER_DISCOUNT_C_DISCOUNT">
         <reference local="C_DISCOUNT_ID" foreign="C_DISCOUNT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_ORDER" name="CORDERDISC_FK_CORDER">
+      <foreign-key foreignTable="C_ORDER" name="C_ORDER_DISCOUNT_C_ORDER">
         <reference local="C_ORDER_ID" foreign="C_ORDER_ID"/>
       </foreign-key>
     </table>
--- a/src-db/database/model/tables/C_ORGASSIGNMENT.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_ORGASSIGNMENT.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -45,13 +45,13 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CORGASSIGNMENT">
+      <foreign-key foreignTable="AD_CLIENT" name="C_ORGASSIGNMENT_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="ADORG_CORGASSIGNMENT">
+      <foreign-key foreignTable="AD_ORG" name="C_ORGASSIGNMENT_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_USER" name="ADUSER_CORGASSIGNMENT">
+      <foreign-key foreignTable="AD_USER" name="C_ORGASSIGNMENT_AD_USER">
         <reference local="AD_USER_ID" foreign="AD_USER_ID"/>
       </foreign-key>
     </table>
--- a/src-db/database/model/tables/C_PAYMENTTERM.xml	Fri Dec 04 11:41:15 2009 +0100
+++ b/src-db/database/model/tables/C_PAYMENTTERM.xml	Fri Dec 04 11:52:51 2009 +0100
@@ -89,10 +89,10 @@