Using a table display method in a query or view

放肆的年华 提交于 2019-12-24 09:37:07

问题


I'm trying to make a query against the table HcmWorker and related. But i want to figure out how to get the result of the display method HcmWorker.primaryDepartmentName() into it's own field in my query.

I also tried creating a view to execute the function via a ViewMethod but that doesn't seem to work as ViewMethods only inject code into the final query against the view.

I'm NOT making a form. The end result has to come through the QueryService.


回答1:


Sorry, but what you are trying to do is not possible.

You could calculate a non stored field in the postLoad method, but that would impact every access to your table, and it would most likely not work in the context of a query service.



来源:https://stackoverflow.com/questions/17483438/using-a-table-display-method-in-a-query-or-view

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!