I use Hibernate with annotations:
- A Team has a number of members (OneToMany)
- I use a link table (team_members) to link a team and its members
Everything goes well, until I also register (annotatedClasses) the link table as a separate class too (to be able to add properties to the link table).
I get an exception: "java.sql.BatchUpdateException: failed batch"
Am I handling this the wrong way?
Info: the link table in between the Team and Member class is defined using:
(@JoinTable(name = "team_members", joinColumns = @JoinColumn(name = "team_id"), inverseJoinColumns = @JoinColumn(name = "user_id")))
|