Hi, first like to say that I'm brand new to NHibernate and so far it's
wonderful!

I'm working with a legacy oracle database that is using trigger auto-
increment id's.  The TriggerIdentityGenerator works great but the
problem is calling session.Persist() causes inserts to go the db
immediately instead of during flush.

Looking through the code I found in the AbstractSaveEventListener
class in PerformSaveOrReplicate a boolean shouldDelayIdentityInserts,
that at one point (revision 3005 in case it helps) would allow the
insert to be delayed.

// NH Different behavior (shouldDelayIdentityInserts=false anyway)
//bool inTxn = source.ConnectionManager.IsInActiveTransaction;
//bool shouldDelayIdentityInserts = !inTxn && !
requiresImmediateIdAccess;
bool shouldDelayIdentityInserts = false;

I changed in my local build to allow this and everything seems to work
as I had hoped and without issue.  Although I'm still trying to figure
out how to get the unit tests to run so I don't know if this breaks
any tests.

Is there any reason this couldn't be reverted back?

Thanks,
Brian Pritchard


-- 
Subscription settings: 
http://groups.google.com/group/nhibernate-development/subscribe?hl=en

Reply via email to