8
Quelle est la différence entre @JoinColumn et mappedBy lors de l'utilisation d'une association JPA @OneToMany
Quelle est la différence entre: @Entity public class Company { @OneToMany(cascade = CascadeType.ALL , fetch = FetchType.LAZY) @JoinColumn(name = "companyIdRef", referencedColumnName = "companyId") private List<Branch> branches; ... } et @Entity public class Company { @OneToMany(cascade = CascadeType.ALL , fetch = FetchType.LAZY, mappedBy = "companyIdRef") private List<Branch> branches; ... }
516
java
hibernate
jpa
orm
one-to-many