svn commit: r1544045 - in /ofbiz/branches/release13.07: ./ framework/entity/src/org/ofbiz/entity/model/ModelEntity.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1544045 - in /ofbiz/branches/release13.07: ./ framework/entity/src/org/ofbiz/entity/model/ModelEntity.java

adrianc
Author: adrianc
Date: Thu Nov 21 06:36:12 2013
New Revision: 1544045

URL: http://svn.apache.org/r1544045
Log:
Merged revision(s) 1543994 from ofbiz/trunk:
Fixed a regression in ModelEntity.java caused by the recent thread-safety refactoring. Patch provided by Leon - https://issues.apache.org/jira/browse/OFBIZ-5399.

Modified:
    ofbiz/branches/release13.07/   (props changed)
    ofbiz/branches/release13.07/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java

Propchange: ofbiz/branches/release13.07/
------------------------------------------------------------------------------
  Merged /ofbiz/trunk:r1543994

Modified: ofbiz/branches/release13.07/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java?rev=1544045&r1=1544044&r2=1544045&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java (original)
+++ ofbiz/branches/release13.07/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java Thu Nov 21 06:36:12 2013
@@ -337,7 +337,7 @@ public class ModelEntity implements Comp
             ModelField existingField = this.getField(newField.getName());
             if (existingField != null) {
                 // override the existing field's attributes
-                // TODO: only overrides of type, colName and description are currently supported
+                // TODO: only overrides of type, colName, description and enable-audit-log are currently supported
                 String type = existingField.getType();
                 if (!newField.getType().isEmpty()) {
                     type = newField.getType();
@@ -350,9 +350,13 @@ public class ModelEntity implements Comp
                 if (!newField.getDescription().isEmpty()) {
                     description = newField.getDescription();
                 }
+                boolean enableAuditLog = existingField.getEnableAuditLog();
+                if (UtilValidate.isNotEmpty(fieldElement.getAttribute("enable-audit-log"))) {
+                    enableAuditLog = "true".equals(fieldElement.getAttribute("enable-audit-log"));
+                }
                 newField = ModelField.create(this, description, existingField.getName(), type, colName, existingField.getColValue(), existingField.getFieldSet(),
                         existingField.getIsNotNull(), existingField.getIsPk(), existingField.getEncrypt(), existingField.getIsAutoCreatedInternal(),
-                        existingField.getEnableAuditLog(), existingField.getValidators());
+                        enableAuditLog, existingField.getValidators());
             }
             // add to the entity as a new field
             synchronized (fieldsLock) {