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
|