willirl said:
Michael, I'm not sure what Hibernate means by "id" but in my
experience, an "id" field usually means a primary key that contains a
unique identifier not related to the purpose of the table. E.g. a
sequential number assigned to the row when the row is created.
A primary key on the other hand _can_ be related to the table contents
for example an employee number or even an employee name.
Just nit-picking.
Ah, now I see what you mean.
Well, the only requirement that Hibernate has for an "id field" is
that it must uniquely identify the row - whether it also has some other
meaning is not technically relevant.
And of course if in your case the id/primary key is derived from some
external source then using the "assigned" generator might be the only
solution (on the other hand, you might also be able to use a custom
generator class).