BL
unread,Apr 6, 2009, 12:11:14 PM4/6/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nhusers
Hi all,
I'm actually evaluating NHibernate while migrating our solutions
on .NET. We are using an Oracle database, with triggers before insert
using sequences for affecting primary keys values.
I've found the way for using sequences with NHibernate, which is
invoking directly the sequence to affect the Id (select
my_sequence.nextval from dual), and the result is inconsistent because
of the triggers.
I can't drop the triggers, because our modules won't be migrated all
together, and the old ones have to continue running.
So.. is there a way to tell NHibernate that the Id is given by the
database and he has just to retrieve it (with a insert into...
returning... query for example) ?
B.L.