Hello Stefan, Thank you for your answer. Yes, I could do that, but then I would be loading unnecessary data from the DB. Depending on the entity graph, that could go really far. In order words, that just switches one problem for another.
The correct solution is not to have these unnecessary properties accessed at all. That's why I think this is actually a bug. The RequestFactory engine should not touch every property in an EntityProxy since it's expected to find ORM proxies. I thought the with() method existed precisely for that reason. As a workaround, I'm creating multiple versions of the same entity proxy, for example a "light" one, with only the eager properties defined, and then other classes which define lazy properties to be used when such properties need to be loaded. That's damn dirty as a solution though. On Sep 7, 3:43 pm, StefanR <[email protected]> wrote: > You can use the OpenEntityManagerInView pattern (servlet filter with Spring) > to ensure a EntityManager session is open during the RF-request. > > 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
