0
我有一個多對多的映射圖書和作者多對多映射與jointable和複合鍵
@Enity
public class Book{
private Long id;
private String name;
...
@Id
@Column(name="book_id")
public getId(){
...
}
@ManyToMany(
@JoinTable(name="book_author",
joinColumns = @JoinColumn(name="book_id"),
inverseJoinColumns = @JoinColumn(name="????")
)
public List<Author> getAuthors(){
...
}
}
@Enity
public class Author{
@EmbeddedId;
private AuthorPk authorPk;
...
}
之間我該怎麼辦是一個多對多的映射上inverseJoinColumn,因爲它是一個複合鍵?