Obviously, there is no spec-defined solution here. As you are using Hibernate, you might get a Hibernate-specific solution if you ask this question on the Hibernate forum.
Regards,
-marina
[Message sent by forum member 'mvatkina' (mvatkina)]
http://forums.java.net/jive/thread.jspa?messageID=296789