Re: Making sense of callbacks

From: Lachlan Deck (lachlan.dec..mail.com)
Date: Mon Nov 02 2009 - 02:19:03 EST

  • Next message: Lachlan Deck: "Re: Making sense of callbacks"

    On 02/11/2009, at 2:23 PM, Andrey Razumovsky wrote:

    > So you've not configured callbacks in model - have you added callbacks
    > through LifecycleCallbackRegistry or something? Could you give a
    > snippet?
    > Could you ensure that both prePersist and postAdd callbacks are
    > invoked
    > (e.g. add a breakpoint there). My test above shows it must be so.

    Here's what I've done to test this.
    -- without upgrading --
    1) create record(s) on client
    2) commit changes
    3) logger.warn.... server.Contact#prePersist called
    4) logger.warn.... server.Contact#validateForSave called
    5) all saved, good.

    -- after upgrade --
    1) add method postAdd() to server.Contact with a logger.warn
    2) create record(s) on client
    3) commit changes
    4) logger.warn.... server.Contact#validateForSave
    5) fails validation

    No lifecycle events fired after upgrade on either prePersist
    (obviously as validation failed) or postAdd.

    with regards,

    --
    

    Lachlan Deck



    This archive was generated by hypermail 2.0.0 : Mon Nov 02 2009 - 16:38:31 EST