nhibernate搜索、更新集合

发布于 2024-11-17 14:53:13 字数 182 浏览 0 评论 0原文

我在供应商和功能集合之间有关系。供应商有很多特征。如果更新了Supplier,我需要在更新Supplier时更新Features集合,因为Supplier是Feature类中的[IndexEmbedded]。

但是,我无法将 [ContainedIn] 属性放在 Features 集合上,因为并非所有功能都属于供应商。有什么想法吗?

I have a relationship between a Supplier and a Features collection. A Supplier HasMany Features. If the Supplier is updated, I need the Features collection to be updated when a Supplier is updated because the Supplier is [IndexEmbedded] in the Feature class.

I cannot however place the [ContainedIn] attribute on the Features collection because not all features belong to a Supplier. Any ideas please?

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

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

发布评论

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

评论(1

狠疯拽 2024-11-24 14:53:13

我自己修好了。

我将 containsin 属性添加到 Features 集合中,然后执行另一个单独的查询来检索不属于供应商的所有功能,然后对它们建立索引。

Fixed it myself.

I added the containedin attribute to the Features collection and then did another separate query to retrieve all the features which did not belong to a supplier and then indexed them.

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