KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
As far as I know, the QueryOver api does not allow you reference an alias by name, but rather you use a typed object. How can I add a restriction to my query that targets the alias? For example, I would like to accomplish something similar to the following: var query = session.QueryOver<Person>().JoinQueryOver(x => x.Dogs, () => dogAlias); return query.Where(Restrictions.Disjunction() .Add(Restrictions.Like("Name", searchQuery, MatchMode.Anywhere)) .Add(Restrictions.Like("dogAlias.Name", searchQuery, MatchMode.Anywhere)));
Tags (comma-separated)
Save Edits
Cancel