hi vincent,

what kind of primitive 'null' should ojb use ?
is this value configurable ?
should it use this value for all primitives or just for key fields ?

you see, the primitive problem is not so easily solved.... maybe you know the trick

jakob

Vincent Frison wrote:

Le jeu 10/07/2003 � 08:36, Charles Anthony a �crit :


Hi Vincent,

If the attribute that the column represents is an "int" i.e. the java
primitive, OJB cannot directly assign it a value of null.

The simplest solution for this is to not use primitives as attributes if
they can be null.



Thanks Charles, just convert my int to Integer, and it's ok now.




If you really want/need to keep the attribute as a primitive, you will have
to use a FieldConversion..... see
http://db.apache.org/ojb/jdbc-types.html for more information.



I'm easily too lazy for do my own FieldConversion, so I think I'll keep
the Integer for my FKs! ;p But it's a shame that null values are not
supported with primitives, not at the Java level of course, but I really
think that OJB could automatically do the trick..






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to