HQL NHibernate - 实体集合的“where子句”

时间:2011-11-09 20:12:38

标签: nhibernate join hql

我正在使用NHibernate 3.2

这是我想做的事(所有尝试失败):

from Car c where (c.Tires.elements.Brand = 'Goodyear')

OR

from Car c, elements(c.Tires) as t where t.Brand = 'Goodyear'

是否可以在不使用连接的情况下执行此操作?如何用连接来做呢?

感谢。

1 个答案:

答案 0 :(得分:2)

from Car c
inner join c.Tires t
where t.Brand = 'Goodyear'
相关问题