Try fast search NHibernate

12 June 2009

typedef for generators

NHibernate 2.1.0Beta1 has another facility for your needs.

Now the <typedef> can be used even for generators:

<typedef name="HighLow" class="NHibernate.Id.TableHiLoGenerator, NHibernate">
<
param name="max_lo">99</param>
</
typedef>

<
class name="EntityCustomId">
<
id name="Id">
<
generator class="HighLow"/>
</
id>
<
property name="Name"/>
</
class>

Only as a reminder the <typedef> tag can be used for any other type definition (properties and collections types).

1 comment:

  1. I've never payed attention to the typedef tag, but it's really useful. NH is still surprising me :)

    ReplyDelete