Represents a fetching strategy.

Namespace:  NHibernate
Assembly:  NHibernate (in NHibernate.dll)

Syntax

Visual Basic (Declaration)
<SerializableAttribute> _
Public Enumeration FetchMode
C#
[SerializableAttribute]
public enum FetchMode
Visual C++
[SerializableAttribute]
public enum class FetchMode
JavaScript
NHibernate.FetchMode = function();
NHibernate.FetchMode.createEnum('NHibernate.FetchMode', false);

Members

Member nameDescription
Default
Default to the setting configured in the mapping file.
Select
Fetch eagerly, using a separate select. Equivalent to fetch="select" (and outer-join="false")
Join
Fetch using an outer join. Equivalent to fetch="join" (and outer-join="true")
Lazy
Eager

Remarks

This is used together with the ICriteria API to specify runtime fetching strategies.

For Hql queries, use the FETCH keyword instead.

See Also