-->
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: <any>-mapping / bidirectional??
PostPosted: Wed Oct 18, 2006 3:57 am 
Newbie

Joined: Wed Aug 30, 2006 7:46 am
Posts: 4
Hello!

I hope somebody could help me. Please have a look at the followin example classes to understand my problem.


interface IObject{
...
}


class A implements IObject{

...
List<Pointer> p;
}



class B implements IObject{

...
List<Pointer> p;
}



class Pointer {
...
IObject o;

}


What i want is an bidirectional association between the class A and Pointer and class B and Pointer.
In the class Pointer I use an IObject, because A and B should be allowed. For this I used the <any>-mapping, but
I´m not sure if an bidirectional-association with an <any>-mapping is possible...


Pointer:
...
<any name="o" meta-type="string" id-type="string"
cascade="none" >

<meta-value value="A" class="A"/>
<meta-value value="B" class="B"/>

<column name="IOBJECT_CLASS"/>
<column name="IOBJECT_ID"/>

</any>

In the classes A and B is an usual List-mapping.

Many 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.