I have an issue trying to get a session to return an aggregate function.
I can do this exact thing with count(*) and it returns fine. When i change to Sum(TransactionAmount) the query will actually return the filtered list, it seems to ignore the SELECT statement.
should this work or should i look at alternate possibilities
Code between sessionFactory.openSession() and session.close():
IList sucessfulRejects = (IList)Persistor.getSession().Filter(
this.EFTRejects, "SELECT Sum(this.TransactionAmount) where this.errorCode = ?",0, NHibernateUtil.Int32);
return (Decimal)sucessfulRejects[0];
thanks
|