I posted the question in the Fluent-NHibernate newgroup but so far there has been no answer from the void.
Is there a Fluent NHibernate mapping for the NHibernate "trigger-identity" method of generating primary keys.
Thanks
I posted the question in the Fluent-NHibernate newgroup but so far there has been no answer from the void.
Is there a Fluent NHibernate mapping for the NHibernate "trigger-identity" method of generating primary keys.
Thanks
You can use
this.Id(x => x.Id).Column("ID").GeneratedBy.Custom("trigger-identity");
Hi dRn sorry didn't work for me got the following innerException :
{"Could not interpret id generator strategy: XXXXXX"}
I am currently using a sequence ".GeneratedBy.Native("MY_SEQUENCE")"
However i would like to have sequences incremented by the trigger (which has to fire on inserts for me anyway).
Cheers.
ODP.net / Oracle 10.2.0.4 OCT09 CPU / Windows 2003 - 32bit / Fluent NHibernate 1.0 / NHibernate 2.1.2.GA / VS2008 SP1 / .net 3.5
So far, the only solution I've found is to use an hbm.xml file for those entities that require trigger-identity generators. However, we ran into another problem when using trigger-identity and "long" ids and our Oracle database . There is a bug where NHibernate does not translate the Id values returned from properly. Here is the JIRA entry: