nhibernate搜索、更新集合
我在供应商和功能集合之间有关系。供应商有很多特征。如果更新了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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我自己修好了。
我将 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.