An IIdentifierGenerator that generates Guid values using a strategy suggested Jimmy Nilsson's article on informit.com.

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

Syntax

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

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

Remarks

This id generation strategy is specified in the mapping file as

 Copy Code
<generator class="guid.comb" />

The comb algorithm is designed to make the use of GUIDs as Primary Keys, Foreign Keys, and Indexes nearly as efficient as ints.

This code was contributed by Donald Mull.

Inheritance Hierarchy

System..::.Object
  NHibernate.Id..::.GuidCombGenerator

See Also