-->
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: OneToManyPersister - generating update as delete-statement
PostPosted: Thu Mar 10, 2005 9:50 am 
Expert
Expert

Joined: Tue Oct 05, 2004 9:45 am
Posts: 263
Hibernate version: 2.1.8
hi,

i've got a one-to-many relationship between to objects, uni-directional.
I've used a "set"-mapping ...
On every column is a "NOT NULL"-constraint in the db.

Everything works fine, loading, updating and creating a new instance.

The only thing that doesn't work is deleting an instance from the set because the OneToManyPersister generates an update-statement with 'null'-values for the foreign keys in the "generateDeleteString"-method. My database doesn't like that ;-)

Is there a way to get it work without making the relationship bi-directional? I've read in the FAQ that this could be a solution ...

Or am i doing something terribly wrong if i'm writing my own persister for that case? On which side of the ony-to-many-relationship must i use this persister?

thx!
curio


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.