-->
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 joined-subclass for Table per concrete class
PostPosted: Tue Jun 14, 2005 11:50 am 
Beginner
Beginner

Joined: Tue Apr 05, 2005 12:09 pm
Posts: 48
Location: Slovakia (SK), Košice (KE)
Hi

Using H3. Is it possible to use:
Code:
<class name="..." abstract="true">
   ...
   <joined-subclas name="..." table="...">
      ...
   </joined-subclass>
</class>

... so that in the <class ...> tag, there is no table="..." attribute specified?

I just want to join tables specified only in joined-subclass.

Maybe you would ask me why I don't use union-subclass if I want Table per concrete class. So the reason is, that I have 9 subclasses each with cca avg 5 different attributes and hibernate generates pretty long SQL satement using UNION ALL. I don't find it very effective and clean.

Moreover this class is also one-to-one mapped to another that has other joined-subclass-es, and if I used union-subclass in this class, the generated SQL was unparsable by Oracle 9i :-( (very sad). That SQL statement was of this form:

SELECT ... FROM ... OUTER JOIN ... OUTER JOIN ... OUTER JOIN (SELECT ... FROM ... UNION ALL SELECT ... FROM ... UNION ALL ...) ...;

Any advice? I've got a headache from all this. Please help. Thanks in advance.

_________________
Martin


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.