> I have some optional (minOccurs=0) numeric fields that i'd like stored as
> null when they don't exist. I see the generated POJOs have "has_<name>"
> booleans which are set & used by unmarshall & marshall. Is there a way to
> have hibernate use these? (It currently stores 0 for missing ones.)
> (are those booleans a standard part of JAXB, or jaxbcommons extensions, or
They are generated if you generate "isSetXXX" methods, this is standard JAXB
Yes, there is a way to do that and I'm planning to do this. The trick is called
"property accessors". For every property you cant define a class that will be
used to access this property by it's name. I've implemented
checks isSetXXX methods when returning the values (if isSetXXX returns false,
getter will return null) and setting them (if value to be set is null, unsetXXX
method will be called instead of the setter).
I only have to update the mapping strategies and test it once again, so it will
soon be available.