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: Multiple posts can be deleted
PostPosted: Fri Oct 03, 2008 1:45 pm 
Newbie

Joined: Mon Sep 22, 2008 9:31 am
Posts: 9
Hibernate version: 3.2.5

How would I map the following Map<EnumA, List<ClassB>>???

I may be way off, but, currently I have something like the following.

Code:
<class...>
...
<map name="myMap" table="tbl_for_map" collection-type="my.special.collection.type.MyCollectionType">
  <key column="key_from_above"/>
  <index column="myMapKey" type="my.special.user.type.for.EnumAUserType"/>
  <one-to-many class="my.ClassB"/>
</map>
</class>


Now the error that I receive is pretty obvious:
Code:
HibernateException: instance not of expected entity type: "java.util.List" is not a: "my.ClassB"


However, I can't seem to find any mapping element that will allow me to specify that the value of the map is a java.util.List that holds numerous my.ClassB objects (instead of using the one-to-many with a class attribute of my.ClassB).

Any help or direction would be greatly appreciated.


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.