JPA Many to Many Relationship Creates Two Join Tables
问题 I am trying to create a many-to-many relationship between User and FileObject classes with the assumption user can access many file objects and file object can be accessed by many user and one-to-many relationship as one user can own many files but one file can only be owned by one user. Here is my code: @Entity public class User { @Id @GeneratedValue(strategy = GenerationType.TABLE) public int id; public String firstname; public String lastname; public String publicAttributes; public String