-->
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: How to define bag for additional fields
PostPosted: Tue Mar 22, 2005 6:06 pm 
Newbie

Joined: Tue Mar 22, 2005 5:43 pm
Posts: 16
Location: Teksouth
Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 2.0

Mapping documents: Nothing

MySql 4.0.20a-nt

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:

I have two tables called User and Group. I also have a table called user_group which has user_id/group_id and alias fields and holds the relationships between a group and users. When I add user to a group a entry in user_group table is also added. This is achieved by defining a bag on group. This is done without any additional code. If I want to also update another field (called alias) in the table user_group, then is there any automatic way to define the relationship or do I have to manually update it.

Thank you.


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.