-->
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.  [ 2 posts ] 
Author Message
 Post subject: optimistic lock + delete + batch problem
PostPosted: Mon Dec 26, 2005 9:28 am 
Newbie

Joined: Tue Nov 08, 2005 1:45 pm
Posts: 6
Hi,


Hibernate version: 3.0.5
database: Oracle 10g

Problem: batch mode + optimistic locking doesn't seems to work with DELETE

when we use :

hibernate.jdbc.batch_versioned_data=true
hibernate.jdbc.fetch_size=20

and version field in mapping

<version name="version" column="VERSION" type="java.lang.Long" unsaved-value="null"/>

the code (Hibernate+Spring):

getHibernateTemplate().delete(persistentObject);
getHibernateTemplate().flush();

doesn't throw exception if version field is wrong.

NO problem if:

- we disable batch feature.
- we use update (not delete) with batch feature.

Is there something to configure specialy, does someone have the same problem or is there a bug fix in a more recent version ?

Regards.

Olivier ROUITS.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 26, 2005 6:39 pm 
Newbie

Joined: Tue Nov 08, 2005 1:45 pm
Posts: 6
Hi again,

Just a text mistake in my message, read:

Code:
hibernate.jdbc.batch_versioned_data=true
hibernate.jdbc.batch_size=20

(not fetch_size)

I've launched my unit test case with delete feature and batch versioned data in Hibernate 2.1.8 and there was no problem.

Thank you for your help.

Olivier.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.