Skip to Content
author's profile photo Former Member
Former Member

Looking for an explanation on 1:n JDO Mappings

Hello,

i'm trying to get the following working:

I have two Objects to be made persistent by JDO named Parent and Child where a parent may have multiple childs.

The parents pk is named GUID and the childs pk is named GUID. The child knows its parent via a parent (PARENT_ID) reference.

How do i have to provide the <reference> elements in the .map file to get a getter for the Set of children on the parent and a getter for the parent on the child so both directions get navigable ?

regards, udo

Add comment
10|10000 characters needed characters exceeded

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 28, 2004 at 05:57 PM

    Hi Udo,

    please have a look at the one-to-many bidirectional relationship mapping documentation here: http://help.sap.com/saphelp_nw04/helpdata/en/bc/c0d9f4b5094e24846d4e88434ac3d1/content.htm

    Hope this helps.

    Regards

    Stefan

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 29, 2004 at 02:53 PM

    Hmm.

    Ok. I did have the reverse mappings specified in the wrong way.

    Thanks for the pointer to the documentation. I somehow got stuck with the JDO sample implemention which is not really usable as explanations.

    regards, Udo

    PS: To the developer of the checker program.

    Some less of the stacktraces and some more of the usable output would make it much easier to find errors. Esp. since the checker does not always show the file the errors are locate in.

    Add comment
    10|10000 characters needed characters exceeded