users@glassfish.java.net

Re: JPA: Mapping boolean values

From: <glassfish_at_javadesktop.org>
Date: Wed, 14 Feb 2007 11:18:06 PST

Currently, there is no way to do this via JPA metadata. You can however add a descriptor customizer (via the "toplink.descriptor.customizer" property) which can update the boolean mapping to have an ObjectTypeConverter to perform the conversions.

Or, another alternative is to map an enum type, e.g. public enum MyBoolean { N, Y }

Cheers,
Guy
[Message sent by forum member 'guypelletier' (guypelletier)]

http://forums.java.net/jive/thread.jspa?messageID=203783