-->
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: ternary assosiation
PostPosted: Fri Dec 28, 2007 4:16 am 
Newbie

Joined: Thu Nov 29, 2007 8:17 am
Posts: 3
Hello all i have some query in the hibernate mapping, Please help me out from this..?

i have a requirement of composite key with three foreign keys. i tried and failed to find the solution.

Lets consider four tables

1.product(id,product_name)
2.category(id,category_name)
3.User (id, user_name)
4. product_category_user( fk_product, fk_category, fk_user, qty, date);

Note :-fk_product, fk_category, fk_user are foreign keys.. and a composite key of this table.


And i want to add records to 4th(product_category_user) table while adding records in the "User" table.

Can any one let me the mapping of "User" table and the 4th table "product_category_user"?

Hope you all get my query.. and if any one has any doubt please let me know...

thanx in advance


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.