Sequences used by triggers with Oracle

0 views
Skip to first unread message

BL

unread,
Apr 6, 2009, 12:11:14 PM4/6/09
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.

Fabio Maulo

unread,
Apr 6, 2009, 12:38:58 PM4/6/09
to nhu...@googlegroups.com

Fabio Maulo

unread,
Apr 6, 2009, 12:42:47 PM4/6/09
to nhu...@googlegroups.com
ah... and don't forget that you should use one of new dialects
Oracle8iDialect
Oracle9iDialect
Oracle10gDialect


2009/4/6 Fabio Maulo <fabio...@gmail.com>



--
Fabio Maulo

BL

unread,
Apr 7, 2009, 6:01:10 AM4/7/09
to nhusers
Thank's ! It works well.
Your post was an interesting reading, but not applicable with the
existing system.

B.L.

Fabio Maulo

unread,
Apr 7, 2009, 12:58:22 PM4/7/09
to nhu...@googlegroups.com
2009/4/7 BL <bj...@hotmail.com>


Thank's ! It works well.
Your post was an interesting reading, but not applicable with the
existing system.

which one?

BTW at least you should say: "but not applicable with MY existing system."

--
Fabio Maulo
Reply all
Reply to author
Forward
0 new messages