I'm trying to store a Set of enums into database using hibernate.

The enum is something like

public enum SomeEnum { 
    ITEM,
    ITEM2,
}

And I have a Hibernate model entity like this

@Entity
public class TableObject implements BaseObject {

private Long id;
private Set<SomeEnum> someEnumSet;

@Column(name = "TABLE_COLUMN", nullable = true, insertable = true, updatable = true)
@ElementCollection
public Set<SomeEnum> getSectionSet() {
    return sectionSet;
}

public void setSectionSet(Set<SomeEnum> sectionSet) {
    this.sectionSet = sectionSet;
}
}

And I don't think @ElementCollection annotation is correct. 'TABLE_COLUMN' column is of type CLOB in the DB. (Oracle).

Thanks, Alex.

Edit
Report