When implemented by a class, retrives an instance of the mapped class, or the identifier of an entity or collection from a IDataReader.

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

Syntax

Visual Basic (Declaration)
Function Hydrate ( _
	rs As IDataReader, _
	names As String(), _
	session As ISessionImplementor, _
	owner As Object _
) As Object
C#
Object Hydrate(
	IDataReader rs,
	string[] names,
	ISessionImplementor session,
	Object owner
)
Visual C++
Object^ Hydrate(
	IDataReader^ rs, 
	array<String^>^ names, 
	ISessionImplementor^ session, 
	Object^ owner
)
JavaScript
function hydrate(rs, names, session, owner);

Parameters

rs
Type: System.Data..::.IDataReader
The IDataReader that contains the values.
names
Type: array< System..::.String >[]()[]
The names of the columns in the IDataReader that contain the value to populate the IType with.
session
Type: NHibernate.Engine..::.ISessionImplementor
the session
owner
Type: System..::.Object
The parent Entity

Return Value

An identifier or actual object mapped by this IType.

Remarks

This is useful for 2-phase property initialization - the second phase is a call to ResolveIdentifier()

Most implementors of this method will just pass the call to NullSafeGet().

See Also