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…
Comments
cosmo
What the hell? That’s a brain fart if I ever saw one.
Leave a comment
Your email address will not be published. Required fields are marked *