[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2449) Lazy loading for one-to-one asociations

jose (JIRA) noreply at atlassian.com
Mon Feb 26 11:09:32 EST 2007


Lazy loading for one-to-one asociations
---------------------------------------

         Key: HHH-2449
         URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2449
     Project: Hibernate3
        Type: New Feature

  Components: core  
    Versions: 3.2.2    
 Environment: Hibernate 3.2.2
    Reporter: jose


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?

NEW 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

-- 
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




More information about the hibernate-issues mailing list