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.  [ 5 posts ] 
Author Message
 Post subject: session.IsDirty() partially flushes
PostPosted: Thu Aug 07, 2008 7:23 pm 
Newbie

Joined: Tue Dec 18, 2007 7:22 am
Posts: 4
Hi,

calling session.IsDirty() executes inserts for new rows in a set mapped with inverse="true" even with FlushMode.Never

Obviously a bug?

Not only it prevents using this method for change tracking but it also prevents unique constraints on collection items e.g. if you load the container, delete an item and add similar one again, unique constraint fails, since dirty check in commit executes inserts before old row is deleted.

--Chuck


Top
 Profile  
 
 Post subject: More details
PostPosted: Sun Aug 10, 2008 3:26 pm 
Newbie

Joined: Tue Dec 18, 2007 7:22 am
Posts: 4
Problem seems be that my collection items are mapped with id generator="identity" and collection cascade="all".

Why does the dirty check force an id assign? As I see it, if it finds a transient instance in a cascading collection, it should stop dirty checking and return true immediately.

Is there a workaround for this?

--Chuck


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 11, 2008 3:03 am 
Regular
Regular

Joined: Mon Aug 29, 2005 3:07 pm
Posts: 77
What version of NHibernate are you using ?

If it is indeed a bug (imho it is unexpected behaviour, so , imho it is a bug), I would file a bug-report on NHibernate's issue-tracker[/url]


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 11, 2008 4:03 am 
Newbie

Joined: Tue Dec 18, 2007 7:22 am
Posts: 4
Tested with 1.2.1 and 2.0 RC1. Same behaviour with both.

Maybe I will file a report since this is pretty easy to produce.

--Chuck


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 15, 2008 2:56 am 
Newbie

Joined: Wed Apr 02, 2008 3:09 pm
Posts: 2
I experience the same problem. Have you found a solution?

_________________
http://www.haugern.net/blog


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

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.