1
我有一个对象“所有者”与集合属性“汽车”。我想根据汽车标准过滤所有者(例如:拥有红色汽车的所有车主),我不想查询非红色汽车SomeOwner.Cars
。所以我想要一个父和集合的查询过滤器。NHibernate过滤器集合和父亲
<class name="Owner">
<set name="Cars">
<key column="FK_Owner" />
<one-to-many class="Car" />
</set>
</class>
<class name="Car">
<many-to-one name="Owner" column="FK_Owner" />
</class>
我该怎么做?
是不是使用Linq提供程序,而不是标准? – Rippo
更新了答案。 – Chev
+1好回答:) – Rippo