I add the complete exception:
The query and the subquery seem to be good...
Select * from Cat where ? in (subquery) .
The only problem is with "?"
If you replace it with "Weight", everythink is OK. But nhibernate doesn't do this.
HERE'S THE EXCEPTION
{"could not execute query\r\n[ SELECT this_.CatId as CatId0_0_, this_.Name as Name0_0_, this_.Sex as Sex0_0_, this_.Weight as Weight0_0_ FROM Cat this_ WHERE ? > (SELECT avg(this_0_.Weight) as y0_ FROM Cat this_0_) ]\r\nPositional parameters: 0 Weight\r\n[SQL: SELECT this_.CatId as CatId0_0_, this_.Name as Name0_0_, this_.Sex as Sex0_0_, this_.Weight as Weight0_0_ FROM Cat this_ WHERE ? > (SELECT avg(this_0_.Weight) as y0_ FROM Cat this_0_)]"}
|