Actually I just did a quick test and the SAX parser returns all attributes
that are defined in the document (even if they have empty string as their
value).  The code as originally written ...

                        // treat empty strings as nulls
                        if (value != null && value.length() > 0) {

Exclude if the value is null (not sure how that would happen) but also if it
is empty string.  So it would be technically feasible to treat explicit
empty string values as "null" for the database and having non-specified
field values ignored (as they are now).

Having said that, if we feel it is more reasonable to be explicit here
(fieldname="null" or null_fieldname="") then I am all for it.

It seems to me personally, that it is more intuitive to have fieldname=""
imply an explicit set to null in the database which would be consist with
what you get on the initial create and would be a force back to "blank" on
an update.  Not having the field clearly implies ignore (which is what it
does now), etc etc etc.

Anyone buying that?  :)
-- 
View this message in context: 
http://n4.nabble.com/Supporting-null-in-data-load-update-tp1100195p1104501.html
Sent from the OFBiz - Dev mailing list archive at Nabble.com.

Reply via email to