-->
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.  [ 3 posts ] 
Author Message
 Post subject: subclass within a joined-subclass (mixed strategy)
PostPosted: Wed Feb 11, 2004 2:02 pm 
Newbie

Joined: Tue Nov 04, 2003 7:44 am
Posts: 4
Location: London
hello,

is it possible for joined-subclass (subclass per table strategy) to contain a subclass?

The outline of my problem is that I have three classes, A, B and C. C extends B and B enxtends A. My tables are T_A and T_B. I'm trying to do the following:

Code:
<class table="T_A" name="A">
   <id name="id" type="long" unsaved-value="0">
      <column name="RID" sql-type="integer"/>
      <generator class="native"/>
   </id>

   <joined-subclass table="T_B" name="B" discriminator-value="0">
      <key column="ID"/>
                <discriminator type="integer" column="DESCRIMINATOR"/>

                <subclass name="C" discriminator-value="1">...</subclass>

   </joined-subclass>
</class>


And the parser complains:
org.xml.sax.SAXParseException: The content of element type "joined-subclass" must match "(meta*,key,(property|many-to-one|one-to-one|component|dynabean|any|map|set|list|bag|idbag|array|primitive-array)*,joined-subclass*)"

It seems that it is invalid to put a <suclass> inside a <joined-subclass> according to the DTD, but I can't see why hibernate would not support this.

Is it really a non-feature?

Thanks,

Stathis


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 11, 2004 2:09 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
There has been a thread on that subject a long time ago. Search for it.

The answer is it is a non-feature.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 11, 2004 2:09 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
You can not mix subclass and joined-subclass in the same hierarchy.


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

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.