I have a table user, and each user has a set of other users as friends. The way I defined it in my model class is this:
Public class User extends Models {
....
@OneToMany
public List<User> friends;
.
.
}
Play JPA now creates the staging table name user_user with the following fields.
mysql> desc user_user;
------------+------------+------+-----+---------+-------+
| user_id | bigint(20) | NO | MUL | NULL | |
| friends_id | bigint(20) | NO | PRI | NULL |
Question: how can I change the name of the staging table (user_user) and the columns in it?
source
share