Re: pre-remove, post-remove

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Sat Nov 06 2010 - 16:57:00 UTC

  • Next message: Bruno René Santos: "RE: pre-remove, post-remove"

    Hi,

    Just found a bit unrelated issue with POST_LOAD callback:

    https://issues.apache.org/jira/browse/CAY-1503

    For your case, it should help if you could post a code example with comments on where you are seeing and not seeing the callbacks.

    Andrus

    On Nov 1, 2010, at 8:10 PM, Bruno René Santos wrote:

    > Hello all,
    >
    > I am having a possibly strange behaviour on my lifecycle callbacks. Imagine de
    > following scenario:
    >
    > 1 textfield and 1 table on a web application. I fill table with query results
    > depending on the textfield value. Each time i get a valueChange event on the
    > textField I remove all lines from table and create new ones. As each line is a
    > cayennedataobject, each time I do this procedure I call deleteObject for each
    > old line that was removed when new lines are created. In the end I commitChanges
    > and only the last lines are saved in relation with the superclass.
    >
    > The problem here is the following. For each erased line cayenne call the
    > preremove callback where I create a log for the table removal, in pending state.
    > The state of the object is modified (this is the first weird thing, shouldn’t be
    > new?) after the preRemove callback the desired process is done but Cayenne never
    > calls the postRemove callback on this situation, for other regular deletes
    > everything works.
    >
    > Anybody recalls a situation where the preXX callback is called but not the
    > postXX?
    >
    > Thanx
    > Bruno Santos
    >
    >



    This archive was generated by hypermail 2.0.0 : Sat Nov 06 2010 - 16:57:34 UTC