Re: Making sense of callbacks

From: Lachlan Deck (lachlan.dec..mail.com)
Date: Mon Sep 28 2009 - 03:06:47 EDT

  • Next message: Evgeny Ryabitskiy: "Passing null values in parameters, part 2 )"

    On 28/09/2009, at 4:53 PM, Andrus Adamchik wrote:

    > On Sep 28, 2009, at 4:08 AM, Lachlan Deck wrote:
    >
    >>
    >> So from what I can see the only two changes required were
    >> 'postInsert' and adjusting the meaning of prePersist
    >
    > I also tend to think that less is better. This discussion thread was
    > a nice brainstorming on the callbacks use patterns. So we've played
    > with a few things and now I am fine if we go a full circle to the
    > minimal change suggested earlier, and don't worry about JPA users,
    > extra delete callbacks, or symmetry between callback types (in many
    > respects there's little symmetry if you look at the object lifecycle
    > - http://cayenne.apache.org/doc/persistent-object-lifecycle.html).
    >
    > So here is the change I am going to make:
    >
    > 1. Call "prePersist" before commit
    > 2. Introduce "postAdd" instead of current "prePersist".
    >
    > This change is minimal and is not incompatible with other ideas.
    > Objections?

    No objections - just a suggestion that whilst looking at this stuff
    it'll be good to review ROP's behaviour with callbacks such that it's
    consistent with the server-side.

    with regards,

    --
    

    Lachlan Deck



    This archive was generated by hypermail 2.0.0 : Mon Sep 28 2009 - 03:07:14 EDT