开发者

Does Gwt 2.1 Entity Proxy support transparent call to lazy loaded entity relations?

开发者 https://www.devze.com 2023-02-02 14:53 出处:网络
Well, I have read the document about Entity Proxy http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html . As far as I understood Entity Proxy does not support transparently calling

Well, I have read the document about Entity Proxy http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html . As far as I understood Entity Proxy does not support transparently calling of lazy loaded entity relations. Such as, I have Employee entity, and this entity has supervisor field whose type is Employee, and this field fetch type is lazy.. When I have quer开发者_开发技巧ied an employee, can I call its getSupervisor method at GWT layer?.. What I expect EmployeeProxy calls transparently getSupervisor method of Employee entity on the server.. Is this the case?.


No, just as you mention it doesn't support lazy loading. It would also be difficult, because while you want to do a getSupervisor(), which would return the data, in practice this would mean GWT performs an asynchronous call, and needs a receiver. Technically, it might be be possible to implement something like lazy loading, but due to the asynchrony it would never be possible to simple do a getSupervisor().


There is the gilead project that might do what you intend.

0

精彩评论

暂无评论...
验证码 换一张
取 消