Fixes issue 17660: It can not delete an organization
authorJavier Etxarri <javier.echarri@openbravo.com>
Fri, 01 Jul 2011 10:01:07 +0200
changeset 13050 a95738137c89
parent 13049 6fada7c40940
child 13051 0ae0b55c71b5
Fixes issue 17660: It can not delete an organization
src-db/database/model/tables/AD_IMAGE.xml
src-db/database/model/tables/AD_PREFERENCE.xml
src-db/database/model/tables/AD_TREENODE.xml
--- a/src-db/database/model/tables/AD_IMAGE.xml	Fri Jul 01 09:52:00 2011 +0200
+++ b/src-db/database/model/tables/AD_IMAGE.xml	Fri Jul 01 10:01:07 2011 +0200
@@ -48,7 +48,7 @@
       <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="AD_IMAGE_AD_ORG">
+      <foreign-key foreignTable="AD_ORG" name="AD_IMAGE_AD_ORG" onDelete="cascade">
         <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_PREFERENCE.xml	Fri Jul 01 09:52:00 2011 +0200
+++ b/src-db/database/model/tables/AD_PREFERENCE.xml	Fri Jul 01 10:01:07 2011 +0200
@@ -89,7 +89,7 @@
       <foreign-key foreignTable="AD_ORG" name="AD_PREFERENCE_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="AD_PREFERENCE_ORGVISIBLE">
+      <foreign-key foreignTable="AD_ORG" name="AD_PREFERENCE_ORGVISIBLE" onDelete="cascade">
         <reference local="VISIBLEAT_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
       <foreign-key foreignTable="AD_ROLE" name="AD_PREFERENCE_ROLEVISIBLE">
--- a/src-db/database/model/tables/AD_TREENODE.xml	Fri Jul 01 09:52:00 2011 +0200
+++ b/src-db/database/model/tables/AD_TREENODE.xml	Fri Jul 01 10:01:07 2011 +0200
@@ -52,7 +52,7 @@
       <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="AD_TREENODE_AD_ORG">
+      <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="AD_TREENODE_AD_TREE" onDelete="cascade">