views:

68

answers:

0

hi, I have table in database that has only two columns and these two colums are FK references. they have made these two colums as composite primarykey.

table structure

Table A
[
A_id PK
Description
]

Table B
[
B_Id PK
Description
]

Table A_B_Pemissiom
[
A_id (FK table A)
B_Id (FK table B)
PrimaryKey ( A_id,B_Id )
]

Can anyone help , I tried several ways and none of them works. Can anyone tell a working Hibernate mapping solution using annotations ?

Thanks,
Gaurav