From: Sergey V. (JIRA) <no...@at...> - 2006-06-30 23:46:08
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1868?page=all ] Sergey Vladimirov updated HHH-1868: ----------------------------------- Attachment: manytoonelazy.zip Sorry one more time - doesn't works correctly only with second level cache. Works fine without it. Current test case tested with latest RC builds. Failed method: WithCacheTest.testLoad() I think the reason is calling method resolveIdentifier() for resolving child entity (BeanB) after retriving parent entity (BeanA) from cache. It hits database. I can clearly see in log: 27279 [main] DEBUG org.hibernate.SQL null - select beana0_.id as id4_0_, beana0_.parent_id as parent2_4_0_ from BeanA beana0_ where beana0_.id=? Hibernate: select beana0_.id as id4_0_, beana0_.parent_id as parent2_4_0_ from BeanA beana0_ where beana0_.id=? > Hibernate must not load any lazy assotiation until required > ----------------------------------------------------------- > > Key: HHH-1868 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1868 > Project: Hibernate3 > Type: Improvement > Components: core > Environment: Last from CVS, 3.2.0rc2, > Reporter: Sergey Vladimirov > Attachments: manytoonelazy.zip, manytoonelazy.zip > > > Hibenate should not load any assotiations until it is required. For example, if BeanA has field > private BeanB parent; > this field MUST NOT be loaded during BeanA loading, if field is marked as LAZY. It behaviour must have place even if NotFound action does not specified. > http://forum.hibernate.org/viewtopic.php?t=961373 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |