Re: Commit with validation errors in detail table

From: Andrus Adamchik (
Date: Thu May 08 2008 - 03:54:56 EDT

  • Next message: Andrus Adamchik: "Re: MySQL engine = NDBCLUSTER"

    On May 7, 2008, at 11:32 AM, Fixe106 wrote:

    > Thank you for your trick Andrus
    > But DataContext.invalidateObjects(failed) does not work because
    > cayenne tries to recommit all the same objects

    I looked at the code ... yeah, "invalidate.." ignores NEW objects,
    which may be a bad idea on Cayenne's part, so we may rethink this
    strategy in the future. But for now the result is that it is not very
    useful for the purpose of partial undo.

    > so I used dataContext.unregisterObjects();

    This doesn't connect in my head with the duplicate key exception.
    Could it be that something else is causing it? You example doesn't
    show which code generates the first INSERT.


    This archive was generated by hypermail 2.0.0 : Thu May 08 2008 - 03:55:36 EDT