Re: Queries order on commit.

From: Laurent Marchal (lmarcha..maeur.com)
Date: Fri Jul 18 2008 - 10:53:20 EDT

  • Next message: Laurent Marchal: "Re: Queries order on commit."

    Ok i will try to modify the object directly, and see the results.
    I will post code if this doesn't work.

    Andrus Adamchik wrote:
    >
    > On Jul 18, 2008, at 5:10 PM, Laurent Marchal wrote:
    >
    >> Hi !
    >>
    >> I would like to do some DELETEs and INSERTs in one transaction, but
    >> since DELETE is made after the INSERTs, it deletes the fresh inserted
    >> values...
    >
    > Yeah, weird. Could you post some sample code? Looking at your log, you
    > delete a dependent object from a relationship, and then readd a new
    > one? IMO the solution should be modifying the existing object instead
    > of doing delete/insert.
    >
    >
    >> Is there a way to force cayenne to do DELETE before all others
    >> operations when a commit occurs ?
    >
    > The ordering algorithm is based on the changed objects graph
    > dependency analysis, to provide ordering consistent with FK
    > constraints. It does not address a scenario of object identity (PK)
    > disappearing and then reappearing again. There is probably a way to
    > customize it (although likely not an easy one), but I still feel like
    > this is not a valid case.
    >
    > Andrus
    >
    >
    >



    This archive was generated by hypermail 2.0.0 : Fri Jul 18 2008 - 10:54:21 EDT