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
|