btocakci
asked on
hibernate composite key
I have a mature project which is using Hibernate as JPA provider. All queries are HQL queries.
Now the requirement is changed for using a composite key on a table that I use frequently. For this, I think I need to use an embedded primary key class thus change all my queries. Can you give me some ideas for coping with this issue with as few modifications as possible?
Now the requirement is changed for using a composite key on a table that I use frequently. For this, I think I need to use an embedded primary key class thus change all my queries. Can you give me some ideas for coping with this issue with as few modifications as possible?
no need to change in HQL query change in hbm file its enough .
ASKER
But this table is associated with much of the tables as 1-to-many and many-to-many. So I need to change all associations and HQLs I think. How to prevent this?
No need HBM file will automatically take care of all relation ship
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.