Hibernate Books

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Session.isDirty() why it call flush?
PostPosted: Fri Dec 16, 2011 7:52 am 
Newbie

Joined: Fri Dec 16, 2011 7:47 am
Posts: 1
When I call method isDirty() on session I see from the call stack that Hibernate try to flush unsaved data from current session and after that i have an assertion error "don't flush the Session after an exception occurs".

Why it happened? Is this normal behavior of this method?

org.hibernate.AssertionFailure: (don't flush the Session after an exception occurs)
at org.hibernate.event.def.DefaultFlushEntityEventListener.checkId(DefaultFlushEntityEventListener.java:82)
at org.hibernate.event.def.DefaultFlushEntityEventListener.getValues(DefaultFlushEntityEventListener.java:190)
at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:147)
at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:219) at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99)
at org.hibernate.event.def.DefaultDirtyCheckEventListener.onDirtyCheck(DefaultDirtyCheckEventListener.java:54)
at org.hibernate.impl.SessionImpl.isDirty(SessionImpl.java:1202)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 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.