-->
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: many-one cascade saving ...
PostPosted: Tue Sep 16, 2003 5:08 am 
Newbie

Joined: Tue Sep 16, 2003 4:59 am
Posts: 10
Hello,

I have a problem running the following scenario

Supplier
Id
Name

1
|
|
|
N

bill
Id
Supplier_Ref
CreationDate


when I create a bill with a supplier that does not exist, the system does not create the supplier in cascade when using session.save(bill) though the cascade all option has been set up. As you can seen it is a non bi-directional relationship. Can I model such a scenario with Hibernate and be able to save a bill with a supplier that is in a not already persisted state or should I do it in two operations session.save(supplier); session.save(bill) ?

Thx in advance


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 16, 2003 8:08 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
No, it should work to create the supplier. Can you post your mappings for Bill and Supplier?


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.