posted 17 years ago
I was wondering whether its a good idea to have a composite key in our table.
Our case is like this
A voyage can have a lot of dailyCargoReports associated to it.
Now the dailyCargoReport table can have 2 columns
voyage_id <pk>
sr_no <pk>
which represents the composite key
OR
one id column represnting the PK and one FK to voyage_id
which is a better way to go for from hibernate perspective.
Thanks