本文介绍了Customer.OrderCount属性映射的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 鉴于客户实体可以拥有多个订单,我希望客户提供一个属性,提供他们拥有的订单数量。 我可以使用MapSingleType停止将OrderCount列映射到customer表,但不知道有效填充它的最佳方法。 有什么想到的吗?解决方案 Given a customer entity that can have many orders, I want a property on the customer that provides a count of the number of orders they have.I can use MapSingleType to stop the OrderCount column from being mapped to the customer table, but do not know the best way to populate it efficiently.Anything spring to mind? 解决方案 这篇关于Customer.OrderCount属性映射的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-28 00:12