-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: IInterceptor.FindDirty results in double version increment
PostPosted: Mon May 19, 2008 9:08 am 
Newbie

Joined: Mon Feb 25, 2008 7:02 am
Posts: 3
Location: London
[b]Hibernate version:[/b] NHibernate 1.2.1.4000

[b]Name and version of the database you are using:[/b] Oracle 10g

Hi there,

I'm using IInterceptor for auditing.
As I am checking all properties whether to audit them or not I already know indices of all dirty properties.

So in FindDirty method of my interceptor instead of returning default value (null) I'm returning these indices in hope to avoid extra dirty check and speed things up a bit.

As a result of this I get double version increment for newly created objects. I'm expecting just OnSave to be called, but I get OnFlushDirty called as well as if they're updated. This causes double version increment as it happens on PostUpdate() method of EntityEntry.

How do I tell NHibernate to use my dirty indices without causing this extra work to be done?

Thanks,
Max.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.