I searched a lot on google regarding this issue and also on this forum.. also went through the documentation in which there r couple of examples... but i m unable to make my query run in nHibernate although it work fine in SQL query analyzer.
Code:
string query = "SELECT MAX(bid.bidPrice) AS bidPrice" +
" FROM tblAuctionBidBO bid" +
" WHERE (bid.item_itemId IN (" + itemIdStr + "))" +
" GROUP BY bid.item_itemId";
IQuery sqlQuery = session.CreateSQLQuery(query, "AuctionBids", typeof(AuctionBidBO));
return sqlQuery.List();
I read somewhere while searching that nHibernate doesn't have "group by" currently.. Is it right or was it for some specific case..?
Thanks a lot.