Enhancement 115 : Support for mapping a List of enum (similarly support List of scalar type and list of embedded bean)
Priority 
High
Reported Version 
 
Logged By 
Rob
Status 
Fixed
Fixed Version 
github
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
23/05/2009
Updated 
23/05/2009
Type 
Enhancement
 
Attachments 
No attachments

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.

 
Rob 18 Jul 05:11
FYI: JPA2 mapping

This type of mapping is supported in JPA2.

Ebean will look to support this with the JPA2 mapping.

woResponse

Upload a file