Implements "bag" semantics more efficiently than PersistentBag by adding a synthetic identifier column to the table.

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

Syntax

Visual Basic (Declaration)
<SerializableAttribute> _
Public Class PersistentIdentifierBag(Of T) _
	Inherits AbstractPersistentCollection _
	Implements IList, ICollection, IList(Of T),  _
	ICollection(Of T), IEnumerable(Of T), IEnumerable
C#
[SerializableAttribute]
public class PersistentIdentifierBag<T> : AbstractPersistentCollection, 
	IList, ICollection, IList<T>, ICollection<T>, IEnumerable<T>, 
	IEnumerable
Visual C++
[SerializableAttribute]
generic<typename T>
public ref class PersistentIdentifierBag : public AbstractPersistentCollection, 
	IList, ICollection, IList<T>, ICollection<T>, IEnumerable<T>, 
	IEnumerable
JavaScript
JavaScript does not support generic types or methods.

Type Parameters

T

Remarks

The identifier is unique for all rows in the table, allowing very efficient updates and deletes. The value of the identifier is never exposed to the application.

Identifier bags may not be used for a many-to-one association. Furthermore, there is no reason to use inverse="true".

Inheritance Hierarchy

System..::.Object
  NHibernate.Collection..::.AbstractPersistentCollection
    NHibernate.Collection.Generic..::.PersistentIdentifierBag<(Of <(T>)>)

See Also