Thursday, August 1, 2013

Re: Issue 5801: Handle Validation Groups

Just to get it right, the ServiceLayerDecorator.validate() method is called after RequestFactory operations have been applied (= setters on your entities) and before invoking your service methods. So validating a PrePersist group in ServiceLayerDecorator.validate() is probably no what you want as your service method can further modify the entity because of some server side business logic implemented in the service method.

So you really want to validate the PrePersist group during em.persist() / em.getTransaction().commit() using your persistence provider but RequestFactory will not detect validation exceptions then as already described.

-- J.

--
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 google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment