Does JPA @ElementCollection annotation always produce an one-to-many relationship?
问题 For this question, consider the following sample: @Entity public class File { public static enum Permission { READABLE, WRITEABLE, EXECUTABLE } @ElementCollection @Enumerated(EnumType.ORDINAL) Set<Permission> permissions; // Omitted } Assuming that the enum values are stored in the ordinal form, does JPA always create an extra table for this set? Can I alter this in order to make this not to be an one-to-many relationship, i.e., using a column instead of an extra table? Thanks. 回答1: "one-to