I have the following two entities:
public class Entity1 { public IList e2 { get; set; } }
public class Entity2 { public string Title { get; set; } }
I only have repository for Entity1, I know I can do a LIKE query with the following criteria:
criteria.CreateAlias("e2", "e1e2").Add(Restrictions.LIKE("Title", "needle", Match.Anywhere);
But I need to search the reverse like:
Restrictions.LIKE("needle", "Title", Match.Anywhere)
How can I do it?