JPA OneToMany and ManyToOne throw: Repeated column in mapping for entity column (should be mapped with insert=“false” update=“false”)
I have three classes one of the name is User and this user have other classes instances. Like this; public class User{ @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL) public List<APost> aPosts; @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL) public List<BPost> bPosts; } public class BPost extends Post { @ManyToOne(fetch=FetchType.LAZY) public User user; } public class APost extends Post { @ManyToOne(fetch=FetchType.LAZY) public User user; } it's working like this but generates emty tables in db. Which have to contains foreign keys. When I tried to use mappedBy and