Hi all NHibernate gurus !
Given these two classes :
public class User {
long Id;
string Name;
}
public class Project {
long Id;
User Owner;
IList<User> Managers;
...
}
I would like to do a query using QueryOver (not using criteria "magic string" aliases), to get all projects having user1 as Owner OR as one of the Managers.
I know how to separately :
- get projects having user1 as Owner : session.QueryOver<>Project>>().Where(p=>p.Owner == user1)
- get as a manager : session.QueryOver<>().JoinAlias(p=>p.Managers, ()=>manager).Where(()=>manager == user1)
but I don't know how to write the disjunction.
If someone had an idea, it would help me a lot.
Thanks in advance,
Chris