-->
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: Is it possible to persist object data to multiple tables
PostPosted: Mon Jan 22, 2007 1:19 am 
Beginner
Beginner

Joined: Wed Oct 25, 2006 12:10 pm
Posts: 41
Simple question for Hibernate Gurus

I have two associated objects i.e. DeviceType and Role. The relationship is uni-directional and Many-To-Many. That means DeviceType can have multiple Roles.

Now my question is

" Is it possble to persist object data (i.e. DeviceType) to associated database tables"

For example if i have
hibernateTemplate.save(DeviceType dt);
then i expect the following insert statements to happen
1)insert into DeviceType(Id, Name, Desc) values(?,?,?)
2)insert into DeviceType_Roles(DeviceType_Id,Role_Id) values(?,?)

If you think its possible to do this in Hibernate 3.1.2 then please take few minutes to look at the posting
http://forum.hibernate.org/viewtopic.ph ... highlight=

P.S. I have looked at Hibernate Documentation & lots of example . Nothing helps hence the posting on forum

Regards
Bansi


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.