I have the following situation:

- I'm sending an entity with an sub-entity to the server using the
RequestFactory pattern. Both are not persisted yet and have no id
assigned. (sth. like a "user" with an associated "organization")
- On the server side both entities are persisted using JPA, but when
persisting the second entity, an exception is thrown.
- The transaction is rolled back, however, the first entity now has an
id assigned. The JPA spec says that the state of these entities is not
defined and they should not be used anymore as they are detached from
the entity context.
- In SimpleRequestProcessor#createReturnOperations() an reference to
the entity bean (that now has an id but had not before) is still
available.
- service#isAlive() returns false for this entity (as detached from
entity context) which causes GWT to send a DELETE operation back to
the client
- This is bad because it the "deleted" entity is not send to the
server again on subsequent request.

Any ideas?

Thanks & Regards,
Stefan.

-- 
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