Get the entity that owned this persistent collection when it was loaded

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

Syntax

C#
Object GetLoadedCollectionOwnerOrNull(
	IPersistentCollection collection
)
Visual Basic
Function GetLoadedCollectionOwnerOrNull ( _
	collection As IPersistentCollection _
) As Object
Visual C++
Object^ GetLoadedCollectionOwnerOrNull(
	IPersistentCollection^ collection
)

Parameters

collection
Type: NHibernate.Collection..::..IPersistentCollection
The persistent collection

Return Value

The owner if its entity ID is available from the collection's loaded key and the owner entity is in the persistence context; otherwise, returns null

See Also