Comment by vinays.work:

From the examples at:

http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html

The domain class Employee:

class Employee {

public void persist() {
    EntityManager em = entityManager();
    try {
      em.persist(this);
    } finally {
      em.close();
    }
  }
...
}

1. The above domain class must contain the persist method in order to use:
Request<Void> createReq = request.persist().using(newEmployee);
This is a serious limitation, as the domain object and the service objects have been forced to be of the same type.

2. By doing this, please realize, that you can only persist a single object at any given server interaction. What if an employee and unrelated object Building needs to be modified in the same Transaction?

3. Why did you simply not adopt the Gilead project model which solves all these issues?

Thank You.

Vinay Soni

For more information:
http://code.google.com/p/google-web-toolkit/wiki/RequestFactory_2_1_1

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to