-->
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: Mapping class objects to separate tables
PostPosted: Wed Jul 20, 2011 8:42 am 
Newbie

Joined: Wed Jul 20, 2011 8:40 am
Posts: 1
I hope I can explain this problem clearly.

I have a class Foo which contains 2 objects of type Bar. I have two mapping files, one for Foo and one for Bar.

The database tables represent a Foo object, and a Bar object. The Foo db table has no reference to the Bars it owns. The Bar table has a FK reference to the Foo object they belong to.

Ideally, my Hibernate mapping file will be set up such that I save a Foo object, and it cascade saves/updates/deletes.

I am fairly new to Hibernate, and have researched different mapping options, but none seem to fit this scenario. Any advice is much appreciated, and I will remain available to answer any questions.

Thank you very much


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.