I have a very annoying hibernate serialization problem.
On the server side I have
servlets and Hibernate to handle the persitence. The hibernate mapping uses annotation and plain POJO objects.
Many of these POJO objects must be used in my
applet as well. It's the exact same functionality in the applet as in the server and they need to be serialized from and to the applet.
ex
How do you handle this situation. I want to load with lazy because there can be very much data on some of the object. If I use eager then the whole database will be serialized.
ex.
Do I have to create DTO that are not Hibernate annotated for this? There will be the exakt same classes in the servlet as in the applet and it seems like duplicating code to me. I assume that many has done this before, but when I search google, Javaranch and Hibernate forum I can't get a satisfying answer.
Hope you can help me.
[ August 27, 2007: Message edited by: Mark Spritzler ]