-->
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: Using a TreeMap in a subclass appears to be difficult!
PostPosted: Thu Sep 06, 2012 11:59 am 
Newbie

Joined: Thu Sep 06, 2012 11:27 am
Posts: 1
I am a new member here and came in the hopes of finding some help with this issue. I am adding some functionality to a large, existing code base. I am needing to add a new Entity type as a subclass of a massively used superclass entitity. Adding the new subclass is no problem at all. I can get it coded and mapped and WORKING. The problem is, I have a need to use a TreeMap (actually, the problem surfaces with ANY Map) in my new Entity.

As our libraries are currently coded, we use <subclass></subclass> to map our subclasses and, inside those, we use <join> </join> to join the new table for the subclass entity. The first thing that I discovered was that Maps are not allowed in a <join> element. I looked in the DTD and they are not allowed.

So then, I found the <joined-subclass> which does! So, I tried embedding that within the superclass mapping. Attempts to map during configuration blew off with very strange errors referencing names I could not even find. It was then, that I ran into this pearl of wisdom in someone's posting in a forum:

Chapter 9. Inheritance mapping
docs.jboss.org/hibernate/orm/3.3/reference/.../inheritance.htmlHowever, Hibernate does not support mixing <subclass> , <joined-subclass> and ... It

.... so..... I can not include a Map in a <subclass> element... and I can not mix <joined-subclass> with <subclass> (and there are way to many to consider remapping)

that said, does anyone have an idea how to use a Map in a subclassed entity?

Thanks in advance for any help I can get.

Bob


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.