users@glassfish.java.net

Casting field to another type before query executes?

From: <glassfish_at_javadesktop.org>
Date: Thu, 06 Dec 2007 15:58:23 PST

I'm dealing w/ an AS/400 system that uses a bizarre format for a null date, where the year is "0001" - obviously not a valid value in Java as a Date - so when I query the entity and this data is found, an exception is thrown.

Can I annotate a specific field to be cast from a Date to a String, so it is converted at query-time?

Thanks!
[Message sent by forum member 'zambizzi' (zambizzi)]

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