Use a sequence/identity, and tell NHibernate the property is generated on insert (http://nhforge.org/doc/nh/en/index.html#mapping-generated)
Diego On Mon, Jun 14, 2010 at 06:35, James <[email protected]> wrote: > Is it possible to use NHibernate's ID generators in order to create an > incrementing natural key? If not, what is the best way to do this? > > MY entity looks like this: > > ID: guid > MyHumanReadableId: int > ... properties ... > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
