db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Jefferson <a...@jpox.org>
Subject Re: Managed 1-1 relationiships
Date Fri, 22 Jul 2005 09:43:19 GMT
> 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.


-- 
Andy

Mime
View raw message