svn commit: r1226055 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java

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

svn commit: r1226055 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java

jleroux@apache.org
Author: jleroux
Date: Sat Dec 31 10:13:34 2011
New Revision: 1226055

URL: http://svn.apache.org/viewvc?rev=1226055&view=rev
Log:
Should close "Null values are not synchronized in http mode" https://issues.apache.org/jira/browse/OFBIZ-4602

I followed Adrian's advice. I tried to create an order with a dropship1 item (like in Jira 4637) and it worked perfectly. I guess, as we were suspecting, using
  set(name, "");
instead of
  element.setAttribute(name, "null");
had side effects.

Anyway, as Adrian pointed out, the right returned string should be "[null-field]" and it's now correct/consistent. On the other side (entity sync clients), of course, now "[null-field]" should be handled instead of "" or "null"

Modified:
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java?rev=1226055&r1=1226054&r2=1226055&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java Sat Dec 31 10:13:34 2011
@@ -1076,6 +1076,8 @@ public class GenericEntity extends Obser
                 } else {
                     element.setAttribute(name, value);
                 }
+            } else {
+                element.setAttribute(name, GenericEntity.NULL_FIELD.toString());
             }
         }