说,我有两个(或三个)表。
PLAYER_POINT
----------------------------------------
PLAYER_ID | PK, FK -> PLAYER
POINT_ID | PK, FK -> POINT
EARNED | INT
PLAYER_POINT_YEAR
----------------------------------------
PLAYER_ID | PK, FK -> PLAYER_POINT
POINT_ID | PK, FK -> PLAYER_POINT
YEAR | PK
EARNED | INT
PLAYER_POINT_MONTH
----------------------------------------
PLAYER_ID | PK, FK -> PLAYER_POINT_YEAR
POINT_ID | PK, FK -> PLAYER_POINT_YEAR
YEAR | PK, FK -> PLAYER_POINT_YEAR
MONTH | PK
EARNED | INT
JPA是否可以将@Inheritance
用于扩展复合主键集?
答案 0 :(得分:3)
PK是固定的继承树。你不能用继承做到这一点