-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: LOSSING FEATURE??
PostPosted: Mon Feb 26, 2007 11:43 am 
Newbie

Joined: Fri Feb 23, 2007 7:40 am
Posts: 1
Lazy loading for one-to-one asociations_________________________
After read "Some explanations on lazy loading" and my tests I found a lossing feature in Hibernate (3.2.2).

one-to-one with lazy="proxy"___________________________________

Hibernate ALWAYS launch selects to know if one-to-one is null or can be proxied.

one-to-one with lazy="no-proxy"________________________________

Instrumentation allows to hibernate modify the getter to allows lazy loading on demand:
* but allways initialize ALL no-proxy relations (with first getter call)
-> must initialize ONLY the requested property
* never auto-initialize FETCH joins, ALWAYS doit on demand (if opened session)
-> must auto-initialize ONLY the FETCHED property

note: Can submit a fix for this? How?

LOSSING FEATURE: one-to-one with lazy="proxy" without multiple SELECTS___

If Hibernate adds join, for all one-to-one relations, to get the foreign-key of other tables, can check it to create a proxy or null.
note: that hibernate adds joins for hierarchy, why not for one-to-one relations?

This solution avoids:
· 'multiple subselects' after first select
· 'instrumentation' of bytecode


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.