-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Error when saving Enumap<Enum,Enum> to db
PostPosted: Mon Jun 08, 2009 1:56 pm 
Newbie

Joined: Mon Apr 13, 2009 8:41 am
Posts: 4
Hi i got a class that has this property and which i want to map via hibernate:
Code:
private EnumMap<HeldenRassenGruppen, FertigkeitsListe> direkt_zuweisung;


i am using the class util.hibernate.GenericEnumUserType for mapping Java 5 enums

here is my hibernate code:
Code:
<map name="direkt_zuweisung" table="structure_effekte_muster_fdirektzuweisung">
            <key column="fs_effektmuster" not-null="true" />
            <index type="HeldenRassenGruppen" column="enum_heldenrassengruppen" />
            <element type="FertigkeitsListe" column="enum_fertigkeitsliste" />
</map>


and here is the error code:

[java] 08.06.2009 19:45:35 org.hibernate.property.BasicPropertyAccessor$BasicSetter set
[java] SCHWERWIEGEND: IllegalArgumentException in class: effekte.muster.Em_BonusFertigkeiten, setter method of property: direkt_zuweisung
[java] 08.06.2009 19:45:35 org.hibernate.property.BasicPropertyAccessor$BasicSetter set
[java] SCHWERWIEGEND: expected type: java.util.EnumMap, actual value: org.hibernate.collection.PersistentMap

Has anyone a idea whats running wrong? i tried everything

greets sandler^^


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.