Hi, I'm running Hibernate 3.0 on Oracle 10g, and have a question on how to disassociate a persistent object from CGLIB. Here is my scenario:
1. I retrieve a parent object from a hibernate session.
2. I get a child object from the parent, which (of course) has a reference to the parent. The object is then detached, because the session is closed - this is a Web application.
3. The parent attribute is never accessed, thus leaving it as a CGLIB attribute.
4. I pass the child object to Castor to marshal it to XML.
5. Castor, of course, tries to access all of the attributes and I get errors because the session has been closed.
So, what I would like to do is to remove all references to parent objects. I will handle child references, but I'm wondering if there's a way to remove non-referenced persistent attributes from a persistent object?
Thanks in advance,
Don
|