连接错误预期的路径

时间:2013-02-14 01:58:27

标签: hibernate createquery

我正在尝试执行以下查询,我收到上述错误。 有什么想法吗?

session.CreateQuery("SELECT SUM(NumberHead) AS numberhead " +
                     "FROM Purchase "
                     +"INNER JOIN Lot " 
                     + "ON Purchase.FeedLot = Lot.Id "
                     + "WHERE Purchase.CohortState = 0").List();

1 个答案:

答案 0 :(得分:1)

试试这个

SELECT SUM(purchase.NumberHead) AS numberhead FROM Purchase purchase INNER JOIN Lot lot ON purchase.FeedLot = lot.Id WHERE purchase.CohortState = 0