-->
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: <join ... /> and <list ... />
PostPosted: Thu Aug 04, 2005 6:18 am 
Beginner
Beginner

Joined: Mon Aug 02, 2004 1:08 pm
Posts: 42
Is there any chance that collections will be supported in <join ... />?

For instance, when mixing "table-per-class-hierarchy" with "table-per-subclass" inheritance mapping strategies, I need lists in <join ... />:
Code:
<subclass name="ApplyType" extends="ExpressionType" lazy="false" >
  <join table="ApplyType">
    <key>
        <column name="Hjid"/>
    </key>
    <property name="FunctionId" type="org.hibernate.type.StringType"/>
    <list cascade="all-delete-orphan" name="Expression" table="ApplyType_Expression">
      <key>
        <column name="ApplyType_Expression_Hjid"/>
      </key>
      <index>
        <column name="Hjindex"/>
      </index>
      <one-to-many class="ExpressionType"/>
    </list>
  </join>
</subclass>


This does not work currently.

Any hints with that?
Thank you for your time.


Top
 Profile  
 
 Post subject: Re: <join ... /> and <list ... />
PostPosted: Thu Aug 04, 2005 6:56 am 
Newbie

Joined: Tue Jul 26, 2005 7:10 am
Posts: 5
Try this:

Code:
<subclass name="ApplyType" extends="ExpressionType" lazy="false" >
  <list cascade="all-delete-orphan" name="Expression" table="ApplyType_Expression">
    <key>
      <column name="ApplyType_Expression_Hjid"/>
    </key>
    <index>
      <column name="Hjindex"/>
    </index>
    <one-to-many class="ExpressionType"/>
  </list>
  <join table="ApplyType">
    <key>
        <column name="Hjid"/>
    </key>
    <property name="FunctionId" type="org.hibernate.type.StringType"/>
  </join>
</subclass>


Top
 Profile  
 
 Post subject: Re: <join ... /> and <list ... />
PostPosted: Thu Aug 04, 2005 7:03 am 
Beginner
Beginner

Joined: Mon Aug 02, 2004 1:08 pm
Posts: 42
holgerwanke wrote:
Try this:

Code:
<subclass name="ApplyType" extends="ExpressionType" lazy="false" >
  <list cascade="all-delete-orphan" name="Expression" table="ApplyType_Expression">
    <key>
      <column name="ApplyType_Expression_Hjid"/>
    </key>
    <index>
      <column name="Hjindex"/>
    </index>
    <one-to-many class="ExpressionType"/>
  </list>
  <join table="ApplyType">
    <key>
        <column name="Hjid"/>
    </key>
    <property name="FunctionId" type="org.hibernate.type.StringType"/>
  </join>
</subclass>


Hmm... This should work, I think.


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.