Monday, August 24, 2015

Re: RequestFactory - update entity

The first question that comes to mind is: where does 'object' come from? (and why is it frozen)

On Monday, August 24, 2015 at 9:10:30 PM UTC+2, Manuel wrote:
Hi everyone,

Im using the requestFactory and want to update an entity. The problem is, its frozen.

I get an entityProxy passed, were I like to update 1 value. The problem is, when I try to edit it with a new Request, it fails, cause the proxy is frozen.

I found this:

It says, I got to get a new entityProxy from the server.

This would take 1 request to receive a "fresh" entityProxy and another for the update... I was wondering, if there is a better way to do this? Or whats the proper way to update a entity with just 1 request?
Is there a way to actually create a new entityProxy on the client that updates an existing entity without loading it from the server?

Thats what I tried:
               PersonRequest request = AppManager.getRequestFactory().personRequest();
PersonProxy proxy = request.create(PersonProxy.class);

.setId(object.getId()); // Copy values of passed object
.persist(proxy).fire(new Receiver<PersonProxy>()

Copy all values ends in hibernate Exception for detached entity passed to persist.

Thanks in advance.


You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment