I have the following enum:
package ir.raysis.tcs.rule.days;
public enum Days {
SUNDAY, MONDAY, TUESDAY, WEDNESDAY,
THURSDAY, FRIDAY, SATURDAY;
}
While the other question is correct, the most simple form could be:
@ElementCollection
@Enumerated
private Set enumValues;
everything else would be set by convention over configuration (join-table-name, columns).
I highly recommend using @Enumerated(EnumType.STRING) - look it up why. And you might need @ElementCollection(fetch = FetchType.EAGER) depending on what (and where) you're doing.