On Wednesday, February 26, 2003, at 04:25 AM, Arnaud BOULAY wrote:
How can I tell Castor XML/JDO to store null value for numeric fields (int, float) and not 0 if the attribute is not set.
You can define a "has" method for the field (this will work for any type, not just primitives). For example, if you have a field named foo, write a method with this signature:
public void hasFoo()
If this method returns false, it is equivalent to having a get method that returns null. Unfortunately, you are constrained to use a method with a name that follows this pattern -- there is not, at present, a has-method mapping attribute.
Rhett
-- Rhett Sutphin Research Assistant (Software) Coordinated Laboratory for Computational Genomics and the Center for Macular Degeneration University of Iowa - Iowa City, IA 52242 - USA 4111 MEBRF - email: [EMAIL PROTECTED]
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
