propogating (or posting events of) object changes (fwd)

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Jan 08 2003 - 15:24:36 EST

  • Next message: Holger Hoffstätte: "Re: propogating (or posting events of) object changes"

    Oops... not sure if you are on the dev list. Copying this user as well...

    From: Andrus Adamchik <andru..bjectstyle.org>
    To: cayenne-deve..bjectstyle.org
    Subject: Re: propogating (or posting events of) object changes
    Date: Wed, 08 Jan 2003 20:20:21 GMT

    If you familiar with how EOF works, it propagates object updates among
    EOEditingContexts within the same JVM, but not accross JVMs. For me (and I
    believe for others too) this was a source of many problems.

    So at the early design stages we made a deliberate decision to exclude
    update notifications from Cayenne, until we implement a mechanism that
    handles it the same way for both local and remote DataContexts.

    Now I hope the time is approaching when we are ready to start solving this
    problem (see recent Holger's messages on cayenne-devel on this topic). This
    is still in the design stage though... So current DataContext is always an
    isolated view of the data.

    Andrus

     

    Dave Paules writes:
    > 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
    > changed.
    >
    > 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
    > "PAULES".
    >
    > 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
    > not.
    >
    > 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
    > view?
    > 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
    > www.quantumleap.us
     



    This archive was generated by hypermail 2.0.0 : Wed Jan 08 2003 - 15:24:43 EST