propogating (or posting events of) object changes

From: Dave Paules (
Date: Wed Jan 08 2003 - 15:07:00 EST

  • Next message: Andrus Adamchik: "propogating (or posting events of) object changes (fwd)"

    Hi list,
    I was using Cayenne the other day and I didn't see an elegant way for
    recognizing when another user has made changes to the same object I have

    Let's use an example:

    I have a Person entity with firstName and lastName attributes.
    The instance in question has the values "Dave" and "Paules" respectively.

    user1 and user2 have both fetched the Person instance Dave Paules.
    Let's say user1 changes the firstName attribute from "Dave" to "dave". He
    commits his change.
    Meanwhile user2 decides to change the lastName attribute from "Paules" to

    After committing his change to lastName, user2 will not see user1's
    firstName change once his commit has successfully completed. user2, even
    thought he was making changes to an object, and that object needs to be
    reconciled with the database (or at least the ObjectStore's snapshot), it is

    user2 believes after his commit that the Person has values "Dave" and
    "PAULES". In reality, the ObjectStore and the database have the correct
    values: "dave" and "PAULES".

    Why is user2's object not updated first from the ObjectStore's snapshot
    during a commit, and then his changes applied on top of this most recent
    Perhaps this cannot be done for toMany relationships, but it should be
    possible for 1:1 and local persistent attributes of the object.

    What are your thoughts? I think this automation is sorely missed in Cayenne.
    Does anyone know of a more elegant workaround? Any help is much appreciated.

    Thanks in advance
    Dave Paules
    Quantum Leap Innovations

    This archive was generated by hypermail 2.0.0 : Wed Jan 08 2003 - 15:09:59 EST