pre-remove, post-remove

From: Bruno Ren� Santos (brunoren..olos.pt)
Date: Tue Nov 02 2010 - 00:10:44 UTC

  • Next message: caden whitaker: "DataMap.loadDataMap existing ObjectContext?"

    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 : Tue Nov 02 2010 - 00:12:26 UTC