Get the id value from the owning entity key, usually the same as the key, but might be some other property, in the case of property-ref

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

Syntax

C#
public virtual Object GetIdOfOwnerOrNull(
	Object key,
	ISessionImplementor session
)
Visual Basic
Public Overridable Function GetIdOfOwnerOrNull ( _
	key As Object, _
	session As ISessionImplementor _
) As Object
Visual C++
public:
virtual Object^ GetIdOfOwnerOrNull(
	Object^ key, 
	ISessionImplementor^ session
)

Parameters

key
Type: System..::..Object
The collection owner key
session
Type: NHibernate.Engine..::..ISessionImplementor
The session from which the request is originating.

Return Value

The collection owner's id, if it can be obtained from the key; otherwise, null is returned

See Also