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: Banging my head with OptimisticLockingException.
PostPosted: Thu Mar 02, 2006 2:35 am 
Beginner
Beginner

Joined: Wed Jan 25, 2006 10:16 am
Posts: 44
Location: Bangalore
Hai,
Iam having a problem working with hibernate. My issue is this.

Say I have a Company object called C.

I have three Employee objects internally say E1 (Employee 1), E2( Employee2) and M1(Manager 1).

Now C has one Manager object inside it, i.e., M1.

M1 internally has E1 and E2.


Now all the three Employee Objects has various Achievements Objects associated with it.


This is the picture of the graph. Now If i delete E1 from the graph and Added E3 into it. I've also added and deleted certain achievements from the Employee Objects.

I do all of these outside a transaction, say at the UI Level. Finally When I pass the Company Object for updating, I get theis errorhibernate Optimistic Locking Exception.


Now how do i get rid of this. I've tried all combinations with select-before-update, dynamic-update, optimistic-locking. Still I cannot get this thing to work.

Why doesn't hibernate just delte the rows which are not present and add new rows which is present in th Object graph. It's not updating.

Please reply, if you cannot understand my message. I'll try rephrasing it.
:-)

_________________
Please vote if my Postings helps. :-)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 08, 2006 8:04 am 
Beginner
Beginner

Joined: Wed Jan 25, 2006 10:16 am
Posts: 44
Location: Bangalore
Wahoo.....
I'm out of this optimistic locking exception.
Guess what. Hibernate is too good n smart. :-)

Thanks guys.

_________________
Please vote if my Postings helps. :-)


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.