0
我需要連接3個表:JPA三聯「@JoinTable」註釋
doc
--------
id
id_user
user
--------
id
id_firm
firm
--------
id
在SQL中,它提供了:
SELECT * FROM DOC d join USER u on d.id_user=u.id join FIRM f on f.id=u.id_firm
我嘗試:
@JoinTable(name = "user",
joinColumns = { @JoinColumn(name = "id_user", referencedColumnName = "id") })
,但它不沒有用(無限循環)。