-->
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 collections in <join>-style subclasses (mix TPCH
PostPosted: Wed Aug 03, 2005 12:47 pm 
Newbie

Joined: Thu Jul 21, 2005 5:30 am
Posts: 5
I am trying to mix TPCH and TPS strategies on a class hierarchy, but can't quite grasp how to do it when the leaf classes contain collections or one-to-many references.

My naive approach (before reading the docs ;-) was

Code:
<class name="A" table="A">
  <subclass name="B">
    <joined-subclass name="C" table="C">
...


which parsed OK and also generated tables as I expected, but barfed at me when I tried to insert an instance of C, trying to insert class' C properties into table A.


After that I read the docs and tried the approach described in 10.1.4, i.e.

Code:
<class name="A" table="A">
  <subclass name="B">
    <subclass name="C">
      <join table="C">
...


But, alas, I cannot use <set> or <one-to-many> or the like inside a <join>.

1. Was I just lucky that Hibernate parsed my first attempt and generated the tables correctly, or should that indeed work?

2. Out of curiosity: what is the rationale for not being able to use collections inside join tables? Are they simply treated as "unmanaged dead-ends" by Hibernate, so that it wouldn't manage detail tables on these?

3. Is there any straight-forward approach to accomplish my goal?


Thanks for any suggestions,

Olaf


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.