Re: Cannot override setPersistenceState in 3.0-M5

From: Bob Schellink (sabob..mail.com)
Date: Wed Jan 21 2009 - 10:05:16 EST

  • Next message: Andrus Adamchik: "Re: Cannot override setPersistenceState in 3.0-M5"

    Andrus Adamchik wrote:
    > Yeah, setPersistentState(..) was used as a simple way to intercept
    > lifecycle events before listeners got introduced in 3.0. Now with
    > listeners in the picture, certain things have changed, and
    > 'setPersistentState' no longer works as before.

    Ah got it. I was following the doc which still refers to
    setPersistenceState:
    http://cayenne.apache.org/doc/handling-inheritance.html

    If possible it would be useful if Cayenne could automatically pick up
    the "class designator value" from the modeler to alleviate users from
    generating lifecycle listeners for this task.

    >> BTW I think we need better exception handling in such situation (e.g.
    >> throw
    >> CayenneRuntimeException("Object not registered"), not just NPE).

    Agreed this would be very helpful.

    kind regards

    bob



    This archive was generated by hypermail 2.0.0 : Wed Jan 21 2009 - 10:06:04 EST