Tag Archives: NHibernate IQuery bug IList

NHibernate possible bug in IQuery.List<T>()

By | September 22, 2008

recently, we had to clean the database from all the testing data, when an error similar to the following appeared: The value “” is not of type “System.Nullable`1[System.DateTime]” and cannot be used in this generic collection The code I executed was:             IQuery query = DbManager.MySession.CreateQuery(“select max(dateObject.EndDate) from DateDomain dateObject”);             IList<DateTime?> list = query.List<DateTime?>();… Read More »