Re: Help with recursive relationship

From: Filip Balas (fbala..mail.com)
Date: Mon Sep 19 2005 - 17:17:28 EDT

  • Next message: Filip Balas: "COMMIT or ROLLBACK TRANSACTION statement is missing."

    Thanks, that works as well.

    It seems I am not the only one with this issue:
    Jerome Chan <eviltof..ac.com>

    He describes a similar problem...
    Is this worth investigating or is resolveFault
    efficient enough that its no big deal?

    Filip

    On 9/19/05, Mike Kienenberger <mkienen..mail.com> wrote:
    > I don't have any insight into your situation, but calling
    >
    > firstLocation.resolveFault() might be better than
    > DC.refetchObject(firstLocation).
    >
    > On 9/19/05, Filip Balas <fbala..mail.com> wrote:
    > > I don't like it, but unless someone can explain
    > > why this is happening, the only solution I can
    > > find is calling refetchObject() on the hollow object.
    > >
    > > Filip
    > >
    > >
    > > On 9/19/05, Filip Balas <fbala..mail.com> wrote:
    > > > FYI
    > > > The data for firstLocation is still in the
    > > > database... so it has not been deleted
    > > > inadvertantly and I have tried restarting
    > > > Tomcat in case I messed up something
    > > > in cayenne somehow.
    > > >
    > > > Filip
    > > >
    > > >
    > > > On 9/19/05, Filip Balas <fbala..mail.com> wrote:
    > > > > 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 - 17:17:29 EDT