From: Sergey V. (JIRA) <no...@at...> - 2006-06-30 08:00:30
|
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 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 |
From: Sergey V. (JIRA) <no...@at...> - 2006-06-30 08:02:29
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1868?page=all ] Sergey Vladimirov updated HHH-1868: ----------------------------------- Attachment: manytoonelazy.zip Add test case for two cases: - loading via Load and initialization of BeanA proxy - obtaining BeanA via find method > 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 > > > 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 |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-06-30 13:12:30
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1868?page=all ] Emmanuel Bernard resolved HHH-1868: ----------------------------------- Resolution: Cannot Reproduce Your test works. > 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 > > > 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 |
From: Sergey V. (JIRA) <no...@at...> - 2006-06-30 14:17:40
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1868?page=comments#action_23503 ] Sergey Vladimirov commented on HHH-1868: ---------------------------------------- Agree. Test is works with latest RC. There was mistype in one of my "hacks" for hibernate-annotation. Sorry for that. But test doesn't work with current SVN context. May be it should be another bug.... or I just need to wait for next SVN update. > 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 > > > 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 |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-06-30 15:48:32
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1868?page=comments#action_23504 ] Emmanuel Bernard commented on HHH-1868: --------------------------------------- Works for me on the latest SVN > 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 > > > 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 |
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 |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-07-01 00:05:08
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1868?page=comments#action_23513 ] Emmanuel Bernard commented on HHH-1868: --------------------------------------- If your complain is related to // XXX: not works!!! assertTrue(((HibernateProxy) beanB).getHibernateLazyInitializer() .isUninitialized()); This is the case because you 've already loaded beanB in the persistence context (beanB.toString(), so it would be stupid for Hibernate to give you an uninitialized version. Let's stop this thread, it really belongs to user forums, not the bug reports. > 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 |
From: Sergey V. (JIRA) <no...@at...> - 2006-07-01 00:10:10
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1868?page=comments#action_23514 ] Sergey Vladimirov commented on HHH-1868: ---------------------------------------- My inattention will kill me soon. Sorry. Trying to extract real test case still. > 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 |