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) Version: 3.2.0.4000 (3.2.0.4000)

Syntax

C#
[SerializableAttribute]
public class PersistentIdentifierBag<T> : PersistentIdentifierBag, 
	IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable
Visual Basic
<SerializableAttribute> _
Public Class PersistentIdentifierBag(Of T) _
	Inherits PersistentIdentifierBag _
	Implements IList(Of T), ICollection(Of T),  _
	IEnumerable(Of T), IEnumerable
Visual C++
[SerializableAttribute]
generic<typename T>
public ref class PersistentIdentifierBag : public PersistentIdentifierBag, 
	IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable

Type Parameters

T

[Missing <typeparam name="T"/> documentation for "T:NHibernate.Collection.Generic.PersistentIdentifierBag`1"]

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..::..PersistentIdentifierBag
      NHibernate.Collection.Generic..::..PersistentIdentifierBag<(Of <(<'T>)>)>

See Also