Thursday, September 27, 2012

Re: for new object, stableId() not the same before/after persist


The important part is: "The one exception to the global scope of an EntityProxyId is the id of a newly-created EntityProxy that has not yet been persisted on the server. An "ephemeral" id is only usable with the RequestFactory from which the newly-created proxy object is derived. Once the proxy has been sent to the server and the server has provided a non-null id, the ephemeral id is upgraded to a persistent id and becomes indistinguishable from any other persistent id."

I believe that means it is working as designed. 


On Wednesday, September 26, 2012 8:42:43 AM UTC-5, Yan wrote:
Hi there, 

I have an entity proxy object that is created on the client. After persisting into server, I would expect the returned proxy (from server) has the same stableId() (i.e., the two equals)

But this is not happening. I thought GWT documentation says the two should equal to each other. Am I missing something?  Here is the code. 

MyObjectProxy value = request.create(MyObjectProxy.class)            // value.getId() is NULL, stableId() has some value in it

request.persist(value).fire(Receiver(MyObjectProxy response) {          // response.getId() is not null,   stableId() has some value in it
     boolean isSame = response.stableId().equals(value.stableId());     // isSame return false     


You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment