Hibernate version:2.1
Mapping documents: <na>
Code between sessionFactory.openSession() and session.close(): <not applicable>
Full stack trace of any exception that occurs: <not applicable>
Name and version of the database you are using:<not applicable>
The generated SQL (show_sql=true):<not applicable>
Debug level Hibernate log excerpt:<not applicable>
Lazy Initialization is working well for us. My question is: How do I detect whether a collection has been initialized? I have tried several different ways to check, but it seems that any attempt to discover the information results in the colllection being initialized.
This is causing a bit of an issue when I attempt to perform additional "cleanup" work to prepare objects for garbage-collection. We have a standard operation named "shutdown()". This operation is responsible for the task of "shutting down" its children and then shutting down itself. If a collection of "children" has not been initialized, previously, I don't want to initialize it in the shutdown operation.
Does anyone have any suggestions on this?
Thanks in advance,
Gerry
|