I have a issue in using subquery with queryover.
This is what I have
var address = QueryOver.Of<Address>()
.Where(x => x.City.IsLike("%" + city + "%")).Select(x => x.Person.Id);
var result = Session.QueryOver<Person>()
.Where(x => x.Type.IsLike(type + "%"))
.And(x => x.Name.IsLike("%" + name + "%"))
.WithSubquery.WhereExists(address);
I have a table for Person and a person has multiple addreses.
So Person id, name, type
and Address will have PersonId and city etc.
So want to search a person by name and type as well as City which is in Address table