Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
Problems with Session and transaction handling?
Read this:
http://hibernate.org/42.html
Hi,
I have two POJOs "A" and "B". Both are marked as "lazy" and A to B is a one to one relation. I have marked the association as outer_join=true so B is always fetched.
Now consider the following scenario, when ehcache is enabled
1)First time Load "A". B is also loaded, and B is not "CGLIB" enahanced class. Both A and B are put in the second level cache
2)Once again load "A" in different transaction. Now "A" is loaded from ehcache. But "B" is not loaded. "B" is shown as "CGLIB" enhanced object in the debugger.
I have following questions
1) why is "B" CGLIB enhanced object when it is loaded from cache and regular object when it is loaded from DB.
2) How does ehache works for assoicated object? Are associated objects also loaded?