Hello, I am using Fluent NHibernate in my application. I have a criteria query that looks like this -
var query = DetachedCriteria
.For<table2>()
.SetProjection(Projections.Distinct(Projections.Property("id")))
//.Add(Restrictions.Between("date_field", startDate, endDate))
.Add(Restrictions.Eq("id", 204010));
Add(Subqueries.In("id", query));
This errors out with the error -
NHibernate.ADOException was unhandled
Message=could not execute query
I looked at the query and tried to run it, but it also errored out. I then noticed that in the subquery, the table name for table2 is in quotes. I removed these quotes and the query ran fine. Does anyone know how I can get rid of the quotes in my criteria?
thanks for any thoughts