On Wednesday, February 9, 2011 8:30:42 PM UTC+1, Ido wrote:
>
> Hi Thomas,
>
> Thanks for the quick reply (and for your blog of course).
> Seems like I  misunderstood the getVersion issue as I thought the locator 
> could resolve it, Actually was mentioned 
> <https://groups.google.com/d/msg/google-web-toolkit/jmLQbgjCd2E/6NtUGbWrgLwJ>in
>  
> this thread, few posts above.
>
> Since the listwidget project makes an extensive usage of the 
> EntityProxyChanged events which I'll be sorry for not using it as well, I 
> would just want a final clarification;
> Using the EntityProxyChanged events requires me to add version field in the 
> database as well as in the entity itself. 
> Is that right?
>

If you want to be able to know when an object has changed, you have to have 
a axis of comparison for this. In RequestFactory, this is the "version", 
which can be any kind of object (IIRC, its toString() will be used).
So either you have a "version" property in your database (could be 
auto-incremented at each save, or a timestamp) or you synthesize one 
yourself (e.g. based on the all the properties of the object; sort of 
"checksum" of the object).
If you cannot tell whether two objects (representing the same database row, 
but "taken" at different points in time) are the same, then you cannot have 
a notion of "update", and RequestFactory cannot possibly fire 
EntityProxyChange(UPDATE) events.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to