具有集合的 Ria 服务实体在不应该为空时是空的?

发布于 2024-08-28 08:23:32 字数 268 浏览 1 评论 0原文

您好,我有一个带有 Employee 和 EmployeeWorksiteReference 的对象模型(因为它是我和中间实体的多对多关系)。

我在其上使用关联、包含和组合标签,以便在保存时将其作为一个整体发送等等,并且在保存时它可以完美地工作。但是,当我加载带有某些 EmployeeWorksiteReferences 的 Employee 时,该集合在客户端上显示为空,当我在调试器返回结果之前检查调试器时,列表包含实例,但在客户端上,当它收到结果时,列表只是空的。

我能做错什么吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

倒带 2024-09-04 08:23:32

经过长时间的调试类似问题后,我发现问题就我而言是由于没有在我的模型中显式包含中间表实体造成的。我最终通过添加缺少的中间类型并更新元数据以反映它来解决了该问题。

此处查看我对该问题的完整解决方案。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文