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

Gérald Quintana (JIRA) noreply at atlassian.com
Thu Jul 28 08:36:17 EDT 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43093#comment-43093 ] 

Gérald Quintana commented on HHH-2449:
--------------------------------------

Seems to be related to issue HHH-3949

> Lazy loading for one-to-one asociations
> ---------------------------------------
>
>                 Key: HHH-2449
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2449
>             Project: Hibernate Core
>          Issue Type: New Feature
>          Components: core
>    Affects 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the hibernate-issues mailing list