Alter process to check for not null correctly in Postgres context. Added e.PO_Name <> to ensure process does not override empty fields in postgres
authorPhil Heenan <phillip.heenan@openbravo.com>
Wed, 20 Aug 2008 20:27:35 +0000
changeset 1576 bb3c7a88250a
parent 1575 504dfe46afd2
child 1577 c739453a69e0
Alter process to check for not null correctly in Postgres context. Added e.PO_Name <> to ensure process does not override empty fields in postgres
src-db/database/model/functions/AD_SYNCHRONIZE.xml
--- a/src-db/database/model/functions/AD_SYNCHRONIZE.xml	Wed Aug 20 14:40:05 2008 +0000
+++ b/src-db/database/model/functions/AD_SYNCHRONIZE.xml	Wed Aug 20 20:27:35 2008 +0000
@@ -322,7 +322,7 @@
       FROM AD_ELEMENT e, AD_COLUMN c
       WHERE AD_FIELD.AD_Column_ID=c.AD_Column_ID  AND c.AD_Element_ID=e.AD_Element_ID
       AND c.AD_Process_ID IS NULL  AND(AD_FIELD.NAME<>e.PO_Name OR COALESCE(TO_CHAR(AD_FIELD.Description), ' ')<>COALESCE(TO_CHAR(e.PO_Description), ' ')
-      OR COALESCE(TO_CHAR(AD_FIELD.Help), ' ')<>COALESCE(TO_CHAR(e.PO_Help), ' ')) AND e.PO_Name IS NOT NULL
+      OR COALESCE(TO_CHAR(AD_FIELD.Help), ' ')<>COALESCE(TO_CHAR(e.PO_Help), ' ')) AND (e.PO_Name IS NOT NULL AND e.PO_Name <> '')
       )
       AND EXISTS
       (SELECT *
@@ -367,7 +367,7 @@
       AND c.AD_Element_ID=e.AD_Element_ID AND c.AD_Process_ID IS NULL
       AND AD_FIELD_TRL.AD_LANGUAGE=e.AD_LANGUAGE  AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y'
       AND(AD_FIELD_TRL.NAME<>e.PO_Name OR COALESCE(TO_CHAR(AD_FIELD_TRL.Description), ' ')<>COALESCE(TO_CHAR(e.PO_Description), ' ')
-      OR COALESCE(TO_CHAR(AD_FIELD_TRL.Help), ' ')<>COALESCE(TO_CHAR(e.PO_Help), ' ')) AND e.PO_Name IS NOT NULL
+      OR COALESCE(TO_CHAR(AD_FIELD_TRL.Help), ' ')<>COALESCE(TO_CHAR(e.PO_Help), ' ')) AND (e.PO_Name IS NOT NULL AND e.PO_Name <> '')
       )
       AND EXISTS
       (SELECT *