-->
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: UserType dirty checking algorithm
PostPosted: Thu Oct 25, 2007 6:02 am 
Newbie

Joined: Thu Oct 25, 2007 5:37 am
Posts: 1
Hi all,

We use a UserType to map an oracle XMLTYPE column based on the implementation given in http://www.hibernate.org/369.html.

In the UserType implementation, we have implemented the isMutable method to true and the accompaying methods : deepCopy, equals and hashcode correctly. Our goal is to detect modifications made to our object (that will be serialized in XML) and to update the XMLTYPE row only when it is necessary.

Actually, we are encountering a strange behaviour which is the following :
during the flush of one transaction, we see that Hibernate generates both an INSERT SQL and an UPDATE on our UserType.

We can not explain this behaviour because the one we expect is to have only one INSERT or one UPDATE per flush.

Does anyone has an explaination why we have both an INSERT and an UPDATE on one entity in one flush ?

We think, there is perhaps something related to the dirty checking algorithm on UserTypes. Does anyone can explain this alogrithm please ?

Thank you for your answers.

Nicolas

PS : The Hibernate version we use is 3.1.3.


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.