why doesnt' nhibernate support this syntax ??

Posted by ooo on Stack Overflow See other posts from Stack Overflow or by ooo
Published on 2010-12-31T19:48:01Z Indexed on 2010/12/31 19:54 UTC
Read the original article Hit count: 213

Filed under:
|
|
|

i have the following query and its failing in Nhibernate 3 LINQ witha a "Non supported" exception.

My DB tables are:

  1. VacationRequest (id, personId)
  2. VacationRequestDate (id, vacationRequestId)
  3. Person (id, FirstName, LastName)

My Entities are:

  1. VacationRequest (Person, IList)
  2. VacationRequestDate (VacationRequest, Date)

Here is the query that is getting a "Non supported" Exception

 Session.Query<VacationRequestDate>().Where(r => people.Contains(r.VacationRequest.Person, new PersonComparer())).Fetch(r=>r.VacationRequest).ToList();

is there a better way to write this that would be supported in Nhibernate?

fyi . .the PersonComparer just compared person.Id

© Stack Overflow or respective owner

Related posts about c#

Related posts about LINQ