An IIdentifierGenerator that indicates to the ISession that identity (ie. identity/autoincrement column) key generation should be used.

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

Syntax

Visual Basic (Declaration)
Public Class IdentityGenerator _
	Implements IIdentifierGenerator
C#
public class IdentityGenerator : IIdentifierGenerator
Visual C++
public ref class IdentityGenerator : IIdentifierGenerator
JavaScript
NHibernate.Id.IdentityGenerator = function();

Type.createClass(
	'NHibernate.Id.IdentityGenerator',
	null,
	NHibernate.Id.IIdentifierGenerator);

Remarks

This id generation strategy is specified in the mapping file as

 Copy Code
<generator class="identity" />
or if the database natively supports identity columns
 Copy Code
<generator class="native" />

This indicates to NHibernate that the database generates the id when the entity is inserted.

Inheritance Hierarchy

System..::.Object
  NHibernate.Id..::.IdentityGenerator

See Also