details:   https://code.openbravo.com/erp/devel/pi/rev/83a3b7b37c1d
changeset: 17747:83a3b7b37c1d
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Thu Aug 23 09:29:56 2012 +0200
summary:   Fixes issue 21426: Adding computed property in a view gives an error 
in the hibernate mapping
Cleaned up the generation of the update/insert properties in the 
dalmappinggenerator
so that no clashes occur anymore.

diffstat:

 src/org/openbravo/dal/core/DalMappingGenerator.java |  7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diffs (25 lines):

diff -r 08b7b4af87d9 -r 83a3b7b37c1d 
src/org/openbravo/dal/core/DalMappingGenerator.java
--- a/src/org/openbravo/dal/core/DalMappingGenerator.java       Wed Aug 22 
16:01:24 2012 +0200
+++ b/src/org/openbravo/dal/core/DalMappingGenerator.java       Thu Aug 23 
09:29:56 2012 +0200
@@ -193,9 +193,6 @@
 
     if (p.getSqlLogic() != null) {
       sb.append(" formula=\"" + processSqlLogic(p.getSqlLogic()) + "\"");
-      if (!p.isInactive()) {
-        sb.append(" update=\"false\" insert=\"false\" ");
-      }
     } else {
       sb.append(" column=\"" + p.getColumnName() + "\"");
     }
@@ -208,10 +205,8 @@
     // for ui and not for background processes
     // if (!p.isUpdatable() || p.isInactive()) {
 
-    if (p.isInactive() || p.getEntity().isView()) {
+    if (p.isInactive() || p.getEntity().isView() || p.getSqlLogic() != null) {
       sb.append(" update=\"false\"");
-    }
-    if (p.isInactive() || p.getEntity().isView()) {
       sb.append(" insert=\"false\"");
     }
 

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to