Ria Services Entity with collection is empty when not supposed to?

一世执手 提交于 2019-12-24 16:43:14

问题


Hi I'm have an object model with an Employee and EmployeeWorksiteReference (cause it's an many to many relation I have and middle entity).

I use Association, Include and Composition tags on it to be able to send it over as one when saving and so on, and when saveing it works perfectly. But when I load an Employee with some EmployeeWorksiteReferences the collection turns up empty on the client, when I check in the debugger exactly before it returns the result the list contains instances but on the client when it receives the result the list is just empty.

What can I have made wrong?


回答1:


After many long hours of debugging a similar issue I found that the problem, in my case, was due to not explicitly including the intermediary table entity in my model. I finally fixed the issue by adding the missing intermediary type and updating the metadata to reflect it.

See my full solution to the problem here.



来源:https://stackoverflow.com/questions/2603145/ria-services-entity-with-collection-is-empty-when-not-supposed-to

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