When modelling a many-to-many relation to the same class, ebean uses the same fk name twice.
class Person { @Id public Long id; @ManyToMany public List friends; // <-----}
The bug-report form lost the version info.I'm experiencing the problem with ebean 2.7.3.
The solution, of course, is to manually specify the join table properties:class Person { @Id public Long id; @ManyToMany @JoinTable( name = "friends", joinColumns = @JoinColumn(name = "friend_id", referencedColumnName = "id"), inverseJoinColumns = @JoinColumn(name = "person_id", referencedColumnName = "id") ) public List friends;}
I don't think we should change Ebean's behavior. In this case I believe you should explicitly specify the foreign key columns.
Leaving Ebean unchanged unless someone argues for some other approach.