Hello! A piece of hql that worked quite well in the past refuses to cooperate since I upgraded to .2001.
var hql = "select distinct cast(floor(a.Price/pg.PriceRangeAmount) * pg.PriceRangeAmount as Double) " + "from Article a " + "inner join a.ProductGroup pg " + "where pg.Key = :key and a.IsDiscontinued = 0 and a.IsActive = 1 " + "order by cast(floor(a.Price/pg.PriceRangeAmount) * pg.PriceRangeAmount as Double)"; return Session.CreateQuery(hql) .SetString("key", key) .List<decimal>(); dies with 2009-06-22 16:44:41,379 [4] WARN NHibernate.Util.ADOExceptionReporter - System.ArgumentException: The value "0" is not of type "System.Decimal" and cannot be used in this generic collection. Parameter name: value at System.ThrowHelper.ThrowWrongValueTypeArgumentException(Object value, Type targetType) at System.Collections.Generic.List`1.VerifyValueType(Object value) at System.Collections.Generic.List`1.System.Collections.IList.Add(Object item) at NHibernate.Util.ArrayHelper.AddAll(IList to, IList from) at NHibernate.Engine.Query.HQLQueryPlan.PerformList(QueryParameters queryParameters, ISessionImplementor session, IList results) at NHibernate.Impl.SessionImpl.List(String query, QueryParameters queryParameters, IList results) 2009-06-22 16:44:41,408 [4] ERROR NHibernate.Util.ADOExceptionReporter - The value "0" is not of type "System.Decimal" and cannot be used in this generic collection. Parameter name: value What is wrong here? 0 not being a decimal is quite picky! -- Jan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com To unsubscribe from this group, send email to nhusers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---