-->
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: delete() doesn't do what I think it should do
PostPosted: Wed Apr 27, 2005 4:39 am 
Newbie

Joined: Tue Jan 11, 2005 12:47 pm
Posts: 5
Hi,

This is kinda related to a couple of earlier posts involving attempts to migrate data from one database to another...

According to the documentation, delete() on a persistent object should revert its state to Transient so it should be able to delete an object using a Session from SessionFactoryA (configured for database 1) then save it to another DB by calling save() on a Session from SessionFactoryB (configured for database 2).

Unfortunately I get a
Code:
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
telling me that there was a problem synchronizing the database state with the Session.

This is the same kind of exception that I would expect if delete() wasn't called implying that the state change back to Transient is conceptual and hibernate doesn't actually do anything to null out IDs etc.

Anyone had similar or contrary experiences.


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.