我有这个表:
Person -> PersonFavorites, PersonCompany
PersonCompany -> Company
我现在必须使用 NHibernate 和 QueryOver 进行以下选择:
select * from Person
inner join PersonFavorites on Person.Id = PersonFavorites.PersonId
inner join PersonCompany on Person.Id = PersonCompany.PersonId
inner join Company on Company.Id = PersonCompany.CompanyId
where ...
有人可以给我一个样品,我该怎么做?- 我的问题是,我必须加入多个 Tables Person -> PersonCompany -> Company。Join Person -> PersonCompany 和 Person -> PersonFavorites 没问题 - 但下一步是 PersonCompany -> Company。