How to map EnumSet (or List of Enums) in an entity using JPA2
- by arteq007
I have entity Person:
@Entity
@Table(schema="", name="PERSON")
public class Person {
List<PaymentType> paymentTypesList;
//some other fields
//getters and setters and other logic
}
and I have enum PaymentType:
public enum PaymentType {
FIXED, CO_FINANCED, DETERMINED;
}
how to persist Person and its list of enums (in this…