Creates a new CollectionType for an IList with id-bag semantics.

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

Syntax

Visual Basic (Declaration)
Public Shared Function IdBag ( _
	role As String, _
	propertyRef As String _
) As CollectionType
C#
public static CollectionType IdBag(
	string role,
	string propertyRef
)
Visual C++
public:
static CollectionType^ IdBag(
	String^ role, 
	String^ propertyRef
)
JavaScript
NHibernate.Type.TypeFactory.idBag = function(role, propertyRef);

Parameters

role
Type: System..::.String
The role the collection is in.
propertyRef
Type: System..::.String
The name of the property in the owner object containing the collection ID, or nullNothingnullptra null reference (Nothing in Visual Basic) if it is the primary key.

Return Value

A IdentifierBagType for the specified role.

See Also