From: Olli R. (J. <nh...@gm...> - 2010-11-01 08:53:43
|
Future queries crash (MultiQuery) when using projection queries using hql + result transformer or the linq provider (which compiles into hql) ---------------------------------------------------------------------------------------------------------------------------------------------- Key: NH-2404 URL: http://216.121.112.228/browse/NH-2404 Project: NHibernate Issue Type: Bug Components: Core Affects Versions: 3.0.0.Beta2, 3.0.0.CR1 Reporter: Olli Ryhänen Priority: Major Using HQL query to create a projection and then choosing a result transformer to it crashes when using .Future<DTO> method to turn it into a multi-query query with exception: System.ArgumentException: The value "System.Object[]" is not of type "DTO" and cannot be used in this generic collection. The same is true when using the new .ToFuture<DTO>() support added for the linq provider and it crashes in the same location of the multi-query implementation. Example code that works: var query = session.CreateQuery("select e.Id as EntityId, e.Name as EntityName from TestEntity e") .SetResultTransformer(Transformers.AliasToBean(typeof (TestEntityDto))) .List<TestEntityDto>(); Same query using future support causes the crash: var query = session.CreateQuery("select e.Id as EntityId, e.Name as EntityName from TestEntity e") .SetResultTransformer(Transformers.AliasToBean(typeof (TestEntityDto))) .Future<TestEntityDto>(); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |