Bob Morley wrote:
> 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).
Again, no. There is a very big difference between an actual empty
string, and a null value. Do not overload the meaning.
> 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? :)
Not me.