Help with recursive relationship

From: Filip Balas (fbala..mail.com)
Date: Mon Sep 19 2005 - 12:44:06 EDT

  • Next message: Filip Balas: "Re: Help with recursive relationship"

    I have a location object and table.
    The location table has:
    ID (index)
    parent_id (optional reference to an ID of another location)
    description

    Now I have the parent, children relationships mapped in cayenne.
    Recently I have encountered the following problem:

    fooLocation has two children:
    firstLocation (created using cayenne)
    secondLocation (created after firstLocation)

    When I execute fooLocation.getChildren()
    I recieve a list back that has:
    a hollow object with the id of firstLocation (state committed)
    a full location object with (state committed)

    Now I have used this relationship many times
    with all of my objects coming back fine...
    Now one of my objects is hollow which causes
    null pointer exceptions everywhere.

    Has anyone encountered this before?

    Filip



    This archive was generated by hypermail 2.0.0 : Mon Sep 19 2005 - 12:44:08 EDT