Re: How to enforce Delete before Insert?

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Fri Apr 28 2006 - 09:19:53 EDT

  • Next message: Andrus Adamchik: "Re: java.sql.SQLException: No rows for 'payment_items'"

    On Apr 28, 2006, at 6:38 AM, Juergen Saar wrote:

    > No, that's the dark side of this kind of working.
    >
    > For us this is really no problem,
    > for most installation we use informix without transaction
    > because it is much faster and we would need transactions
    > in about 1% of our software. So we have implemented
    > a kind of self-healing for most kinds of data-defects.

    Not that I think it is a good solution in this case, but since you
    have it in place already - here is how you can do transactions
    wrapping multiple DataContexts (this will require 1.2 release)

    http://objectstyle.org/confluence/display/CAYDOC/Understanding
    +Transactions

    > Nevertheless it would be fine to have a fifo strategy for db-
    > statements in
    > cayenne.

    I am yet convinced that this would be a good general DB commit
    strategy (it might as well be, still I am not ready now to discuss
    this in depth). But here is a thing - nested contexts do use the FIFO
    strategy when committing from one to another, and the needed change
    order information is available already during commit. So we'll gladly
    accept a patch that implements a FIFO strategy as an option ;-)

    Still I'd like to understand what causes the original problem... Is
    this a SQLServer/Informix thing??? I've never seen it on Oracle or
    Postgres.

    Andrus



    This archive was generated by hypermail 2.0.0 : Fri Apr 28 2006 - 09:20:19 EDT