首页 新闻 会员 周边

activerecord ScalarQuery聚合函数问题

0
[待解决问题]

 string hql = @"select sum(REPLENISH_AMONUT)     from TUSER_REPLENISH   ";

    ScalarQuery<decimal>  sq = new ScalarQuery<decimal>(typeof(TuserReplenish), hql);

 decimal  currentAmount= sq.Execute();

然后就执行错误

异常详细信息: NHibernate.Hql.Ast.ANTLR.QuerySyntaxException: TUSER_REPLENISH is not mapped [select sum(REPLENISH_AMONUT)        from TUSER_REPLENISH,

我参考了 ActiveRecord官网的hql写法都一样,不知那个要怎么映射,望指教(本人新学), 谢谢!

 

mythzz的主页 mythzz | 初学一级 | 园豆:2
提问于:2011-05-20 17:15
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册