user_table (user_id integer, name varcahr)user_role_table (user_id integer, role varchar)
Mapping to:
@Entity class User { public enum SecurityRole { ADMIN, USER, NONE } ... private List<SecurityRole> roles; }
Essentially @OneToMany only supports entities.
The ENH is to additionally add support for enum, scalar types and embedded beans for @OneToMany.
This type of mapping is supported in JPA2.
Ebean will look to support this with the JPA2 mapping.