-->
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: unidirectional 1:1 with join table and attribute
PostPosted: Tue Sep 20, 2005 1:56 pm 
Newbie

Joined: Tue Sep 20, 2005 1:52 pm
Posts: 6
Hi all, (Entschuldigung für die Formulierung auf englisch)

I try to figure out the following:

A class A (attributes a_id, b) has a 1:1 association (unidirectional) to class B (attribute b_id). The association is persisted in a join table AB (attributes a_id, b_id, discriminator). The 1:1 association can be found with the aid of the discriminator (lets say discriminator must be 'X'). The incomplete solution (for the mapping file A) might be:

<join table="AB"
optional="true">
<key column="a_id"
unique="true"/>
<many-to-one name="b"
column="b_id"
not-null="true"
unique="true"
class="B"/>
</join>

How can I add the additional condition "discriminator='X'" to the mapping ?

Thanks for any help,
Mike


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.