[hibernate-issues] [Hibernate-JIRA] Commented: (ANN-430) @ManyToOne results in default outer join eager fetch, should be lazy

Emmanuel Bernard (JIRA) noreply at atlassian.com
Tue Sep 5 11:07:24 EDT 2006


    [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-430?page=comments#action_24309 ] 

Emmanuel Bernard commented on ANN-430:
--------------------------------------

9.1.22 fetch default EAGER
I don't know the exact reason for it, it was settled before I joined.

> @ManyToOne results in default outer join eager fetch, should be lazy
> --------------------------------------------------------------------
>
>          Key: ANN-430
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-430
>      Project: Hibernate Annotations
>         Type: Bug

>   Components: documentation, binder
>     Reporter: Christian Bauer

>
>
> Documentation says:
>       <sect3>
>         <title>Association fetching</title>
>         <para>You have the ability to either eagerly or lazily fetch
>         associated entities. The <literal>fetch</literal> parameter can be set
>         to <literal>FetchType.LAZY</literal> or
>         <literal>FetchType.EAGER</literal>. <literal>EAGER</literal> will try
>         to use an outer join select to retrieve the associated object, while
>         <literal>LAZY</literal> is the default and will only trigger a select
>         when the associated object is accessed for the first time. EJBQL also
>         has a <literal>fetch</literal> keyword that allows you to override
>         laziness when doing a particular query. This is very useful to improve
>         performance and is decided on a use case to use case basis.</para>
>       </sect3>
> However, a simple @ManyToOne without any other attributes results in an eager join outer fetch.

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