Namespaces

Types in FluentNHibernate.Conventions.Instances

Type GeneratorInstance

Namespace FluentNHibernate.Conventions.Instances

Parent GeneratorInspector

Interfaces IGeneratorInstance

Methods

Properties

Public instance methods

void GuidNative()

Generator that uses the RDBMS native function to generate a GUID. The behavior is similar to the “sequence” generator. When a new object is saved NH run two queries: the first to retrieve the GUID value and the second to insert the entity using the Guid retrieved from the RDBMS. Your entity Id must be System.Guid and the SQLType will depend on the dialect (RAW(16) in Oracle, UniqueIdentifier in MsSQL for example).

void GuidNative(Action<ParamBuilder> paramValues)

Generator that uses the RDBMS native function to generate a GUID. The behavior is similar to the “sequence” generator. When a new object is saved NH run two queries: the first to retrieve the GUID value and the second to insert the entity using the Guid retrieved from the RDBMS. Your entity Id must be System.Guid and the SQLType will depend on the dialect (RAW(16) in Oracle, UniqueIdentifier in MsSQL for example).
Parameters
Action<ParamBuilder> paramValues

Parameter builder closure

void HiLo(string table, string column, string maxLo, string where)

uses a hi/lo algorithm to efficiently generate identifiers of any integral type, given a table and column (by default hibernate_unique_key and next_hi respectively) as a source of hi values. The hi/lo algorithm generates identifiers that are unique only for a particular database. Do not use this generator with a user-supplied connection. requires a "special" database table to hold the next available "hi" value
Parameters
string table

The table.

string column

The column.

string maxLo

The max lo.

string where

The where.

void Native(string sequenceName, Action<ParamBuilder> paramValues)

picks identity, sequence or hilo depending upon the capabilities of the underlying database.

void Native(string sequenceName)

picks identity, sequence or hilo depending upon the capabilities of the underlying database.

void Select(Action<ParamBuilder> paramValues)

A deviation of the trigger-identity. This generator works together with the NaturalId feature. The difference with trigger-identity is that the POID value is retrieved by a SELECT using the natural-id fields as filter.
Parameters
Action<ParamBuilder> paramValues

Parameter builder closure

void SequenceIdentity(string sequence)

Based on sequence but works like an identity. The POID value is retrieved with an INSERT query. Your entity Id must be an integral type. "hibernate_sequence" is the default name for the sequence, unless another is provided.
Parameters
string sequence

Custom sequence name

void SequenceIdentity(string sequence, Action<ParamBuilder> paramValues)

Based on sequence but works like an identity. The POID value is retrieved with an INSERT query. Your entity Id must be an integral type. "hibernate_sequence" is the default name for the sequence, unless another is provided.
Parameters
string sequence

Custom sequence name

Action<ParamBuilder> paramValues

Parameter builder closure

void SequenceIdentity()

Based on sequence but works like an identity. The POID value is retrieved with an INSERT query. Your entity Id must be an integral type. "hibernate_sequence" is the default name for the sequence, unless another is provided.

void SequenceIdentity(Action<ParamBuilder> paramValues)

Based on sequence but works like an identity. The POID value is retrieved with an INSERT query. Your entity Id must be an integral type. "hibernate_sequence" is the default name for the sequence, unless another is provided.
Parameters
Action<ParamBuilder> paramValues

Parameter builder closure

void TriggerIdentity()

trigger-identity is a NHibernate specific feature where the POID is generated by the RDBMS with an INSERT query through a BEFORE INSERT trigger. In this case you can use any supported type, including a custom type, with the limitation of a single column usage.

void TriggerIdentity(Action<ParamBuilder> paramValues)

trigger-identity is a NHibernate specific feature where the POID is generated by the RDBMS with an INSERT query through a BEFORE INSERT trigger. In this case you can use any supported type, including a custom type, with the limitation of a single column usage.
Parameters
Action<ParamBuilder> paramValues

Parameter builder closure

Public properties

string Class get;

Type EntityType get;

IDictionary<string, string> Params get;

string StringIdentifierForModel get;