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

Christian Bauer (JIRA) noreply at atlassian.com
Fri Sep 1 12:28:24 EDT 2006


@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