Re: [flattened relationships] update relationship only will not execute

From: Laszlo Spoor (lspoor_cayenn..otmail.com)
Date: Sun May 11 2003 - 16:56:41 EDT

  • Next message: Chris Hyzer: "Can cayenne manage synchronization between Java and PL/SQL objects?"

    Hi Holger,

    Thanks for your reply. I have tried your tip, but unfortunately the result
    is the same. I have noticed that adding extra types resulted in the web
    application reacting correctly. That is, I notice the changes are being
    processed corrrectly (so the new relations actually are visible), but as
    soon as I exit the application and log in again the changes are gone (not
    that they were added in the datastore).

    Also, when debugging the application I noticed that the relationships were
    actually added to the object, but the command 'mContext.commitChanges();'
    just did not do anything in the sense of database transactions. Maybe for
    some reason DataContext does not 'know' that the object actually changes.

    Regards, Laszlo

    >From: Holger Hoffstätte <holge..izards.de>
    >CC: cayenne-use..bjectstyle.org
    >Subject: Re: [flattened relationships] update relationship only will not
    >execute
    >Date: Sun, 11 May 2003 17:57:38 +0200
    >
    >Laszlo Spoor wrote:
    > > ...
    > > (updating flattened relationships on hollow objects does not
    > > seem to work)
    > > ...
    > > The result is that nothing is being send to my datastore. But, if I do
    > > something
    > > like:
    > >
    > > pto.setName("anotherName");
    > > pto.addToType(pte);
    > > mContext.commitChanges();
    > >
    > > It works allright. The name is changed and the relationship is created.
    >I
    > > could of course, remove the object from the datastore and recreate is
    > > (mySQL has no problem with that), but that seems a bit odd.
    >
    >Try to 'touch' the pto object e.g. by calling pto.getName(), try again and
    >let us know what happens. I have an idea where and why this happens; if it
    >works after touching, we can pinpoint the problem better.
    >
    >Holger

    _________________________________________________________________
    Help STOP SPAM with the new MSN 8 and get 2 months FREE*
    http://join.msn.com/?page=features/junkmail



    This archive was generated by hypermail 2.0.0 : Sun May 11 2003 - 16:56:21 EDT