Joined: Thu Oct 07, 2004 3:53 pm Posts: 10
|
I have the following mapping @Entity @Table(name = "av_contribution") public class Contribution {
.....
@CollectionOfElements(targetElement = BoardKind.class) @Enumerated(EnumType.STRING) @JoinTable(name = "av_contrib_boardkind", joinColumns = @JoinColumn(name = "cid")) Set<BoardKind> boardKinds = new HashSet<BoardKind>();
.....
When I do a merge of this entity I get:
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Enum at org.hibernate.type.EnumType.nullSafeSet(EnumType.java:134) at org.hibernate.type.CustomType.nullSafeSet(CustomType.java:146) at org.hibernate.persister.collection.AbstractCollectionPersister.writeElement(AbstractCollectionPersister.java:755) at org.hibernate.persister.collection.AbstractCollectionPersister.insertRows(AbstractCollectionPersister.java:1364) at org.hibernate.action.CollectionUpdateAction.execute(CollectionUpdateAction.java:56)
Using hibernate 3.2.5.ga
Any help greatly appreciated!
|
|