-->
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.  [ 4 posts ] 
Author Message
 Post subject: mixing table-per hierarchy and table-per-subclass strategies
PostPosted: Wed Jan 14, 2004 5:15 pm 
Beginner
Beginner

Joined: Fri Oct 24, 2003 10:45 am
Posts: 22
Hi all,

Is it posiible to mix table-per hierarchy and table-per-subclass strategies on <subclass> or <joined-subclass> level?

For example, DTD does not allow constructions like this:

<class>
<subclass>
<joined-subclass>
</joined-subclass>
</subclass>
</class>

or

<class>
<joined-subclass>
<subclass>
</subclass>
</joined-subclass>
</class>

So it seems we can mix those strategies only on <class> level

<class>
<subclass>
</subclass>

<joined-subclass>
</joined-subclass>
</class>

Is there any workaround for this limitation?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 14, 2004 5:30 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
No,
Yes, use one-to-one association.

You can also search the forum on this subject, it was discussed in a interesting thread.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 14, 2004 5:35 pm 
Beginner
Beginner

Joined: Fri Oct 24, 2003 10:45 am
Posts: 22
Emmanuel,

thanks a lot!

Did you mean I should use composition rather than inheritance in my object model? Unfortunately it is impossible in my case because model is "fixed" already and it uses inheritance.

It seems there is absolutely no way to implement that in existing object model...


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 15, 2004 3:07 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Actually the pb you're facing is a fixed DB model that mix the 2n strategies

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.