-->
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: Optional join using discriminator (or pivot table)
PostPosted: Mon Mar 14, 2011 4:43 pm 
Newbie

Joined: Tue Mar 08, 2011 3:55 pm
Posts: 6
I have a data model which I have to conform to. This data model defines some properties of an object as rows (using a type column), whereas I want to define these as separate variables in my object model.

Basically, Id like to do the following, however the where attribute is not usable:

<class name"parentClass">
<join table="CHILD" where="type ='TYPE_A'" optional="true">
<key column="PARENT_ID"/>
<component name="attA" class="ChildClass">
<property name="initial"/>
<property name="first"/>
<property name="last"/>
</component>
</join>
<join table="CHILD" where="type ='TYPE_B" optional="true">
<key column="PARENT_ID"/>
<component name="attB" class="ChildClass">
<property name="initial"/>
<property name="first"/>
<property name="last"/>
</component>
</join>
</class>

The where attribute is not available on join. Is there any other way to implement this?


thanks in advance


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.