[ 
https://issues.apache.org/cayenne/browse/CAY-789?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrus Adamchik closed CAY-789.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0

> return object diff to client in ROP after commit
> ------------------------------------------------
>
>                 Key: CAY-789
>                 URL: https://issues.apache.org/cayenne/browse/CAY-789
>             Project: Cayenne
>          Issue Type: Improvement
>          Components: Cayenne Core Library
>    Affects Versions: 3.0
>            Reporter: Ari Maniatis
>            Assignee: Andrus Adamchik
>             Fix For: 3.0
>
>
> Currently, when an object is committed in three tier environment from the 
> client, the PK is returned to the client. However with the possibility of 
> other changes being made to that object in Lifecycle callbacks, the client 
> will be left with a stale copy of the object. I see three solutions, from 
> simplest to most complicated:
> 1. after every commit on the client, mark the object as HOLLOW. Although this 
> will generate a little more traffic sometimes, it is probably not significant 
> in most workflows.
> 2. return a flag from the server if the object was touched in a lifecycle 
> event. This then sets HOLLOW on the client.
> 3. return the diff of changes to the object to the client
> Although at first glance (3) looks like it might be most efficient, it 
> actually may not be. In many cases the developer discards a context 
> immediately after committing the data in it, in which case the diff was 
> returned unnecessarily. This is our situation since our list views use a 
> shared context (read only) and each edit view creates a new specific editing 
> context which is discarded upon save and closing the window. 
> Others might have different workflows.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to