-->
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: Why can't one extend union-subclass with subclass ?
PostPosted: Fri Mar 25, 2005 10:00 am 
Newbie

Joined: Wed Aug 18, 2004 2:31 pm
Posts: 1
Hibernate version 3.0 RC

After reading the Reference manual and the H3 DTD I do not quite understand the following limitation in Hibernate 3:

The DTD does not allow to extend a union-subclass with a subclass element.

What we want to achieve is to map the following class hierarchy:

Code:
              (abstract)
                 Top
                /   \
               /     \
    (abstract)        (abstract)
     Middle1            Midlle2
    /       \          /       \
Base1a   Base1b    Base2a   Base2b


The Middle1 and Middle2 hierarchies should both be mapped with table-per-class-hierarchy mappings, e.g. one table for Middle1 and it's subclasses and one table for Middle2 and it's subclasses.

So we thought this mapping should work:

Code:
<class name="Top" abstract="true">
  ...

  <union-subclass name="Middle1" abstract="true">
    <subclass name="Base1a">
       ...

    <subclass name="Base1b">
       ...

  <union-subclass name="Middle2" abstract="true">
    <subclass name="Base2a">
       ...

    <subclass name="Base2b">
       ....



As said above the DTD does not allow this. So we want to know if there is another way to express our mapping?
Or is this limitation a bug in the DTD?

Thanks, Olli

_________________
--og


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.