posted 15 years ago
@JoinColumn is used to join any column in 2 tables, Where as @PrimaryKeyJoinColumn it joins based on the primary keys
For Example
Say you have 2 tables
Employee - id, name, age
Bank - id, acct
So in this case if you want to join these two tables based on primary key, we could use @PrimaryKeyJoinColumn.
As such there is not much of a difference. Both could be used
SCJP 1.4, SCWCD 1.4, SCBCD 1.5, TOGAF 9, Comptia Cloud+