Differences between NHibernate FetchMode.Eager and FetchMode.Join

What are the differences between FetchMode.Eager and FetchMode.Join?  There are none!  According to the Java Hibernate docs, FetchMode.Eager and FetchMode.Lazy have been deprecated.

In NH 1.2.1 GA source code, this is how FetchMode is defined:

   15     [Serializable]
   16     public enum FetchMode
   17     {
   18         /// <summary>
   19         /// Default to the setting configured in the mapping file.
   20         /// </summary>
   21         Default = 0,
   22         /// <summary>
   23         /// Fetch eagerly, using a separate select. Equivalent to
   24         /// <c>fetch="select"</c> (and <c>outer-join="false"</c>)
   25         /// </summary>
   26         Select = 1,
   27         /// <summary>
   28         /// Fetch using an outer join.  Equivalent to
   29         /// <c>fetch="join"</c> (and <c>outer-join="true"</c>)
   30         /// </summary>
   31         Join = 2,
   32 
   33         Lazy = Select,
   34         Eager = Join
   35     }

Well, now that clears up some of my confusions... confused0078.gif

2 Comments Filed Under [ NHibernate ]

Comments

# re: Differences between NHibernate FetchMode.Eager and FetchMode.Join
Gravatar What the hell? That's a brain fart if I ever saw one.
Left by cosmo on 1/5/2009 1:09 PM
# Un pattern şi trei implementări (partea 3)
Gravatar &amp;Icirc;n precedentele două posturi ( 1 , 2 ) am povestit despre cum se realizează eager loading &amp;icirc;n
Left by Tudor Turcu - blog on 11/17/2009 6:25 AM

Leave Your Comment

Title*
Name*
Email (never displayed)
 (will show your gravatar)
Url
Comment*

Please add 6 and 6 and type the answer here:

Preview Your Comment.