db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Watzek <mwa.t...@spree.de>
Subject Re: Managed 1-1 relationiships
Date Fri, 22 Jul 2005 09:50:38 GMT
Hi Andy,

my fault - sorry. I did not realize that the unenhanced Employee class 
contains code managing relationships already.

Thanks for pointing that out!

Regards,
Michael
>>In my case, the identity type is datastore and there are separate files
>>for jdo metadata and orm metadata. The orm metadata file contains the
>>"mapped-by" attribute
> 
> 
> Well I use datastore identity, and mapped-by. The fact that you're using 
> separate files is not of relevance since JPOX just merges them.
> 
> Looking at your class you have :-
> 
> public void setProtege(Employee protege) {
>         this.protege = protege;
>         protege.mentor = this;
>     }
> public void setMentor(Employee mentor) {
>         this.mentor = mentor;
>         mentor.protege = this;
>     }
> 
> It is hardly surprising that it is enhanced as you say ... since you have 
> included the managed relationship line already. This is not added by the 
> enhancer. The enhancer simply corrects calls to the field to go via 
> jdoSetXXX. If the user has already added managemenet of relationships then 
> they remain.
> 
> 


-- 
-------------------------------------------------------------------
Michael Watzek                  Tech@Spree Engineering GmbH
mailto:mwa.tech@spree.de        Buelowstr. 66
Tel.:  ++49/30/235 520 36       10783 Berlin - Germany
Fax.:  ++49/30/217 520 12       http://www.spree.de/
-------------------------------------------------------------------

Mime
View raw message