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 |
From: Olli R. (J. <nh...@gm...> - 2010-11-01 09:07:42
|
[ http://216.121.112.228/browse/NH-2404?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Olli Ryhänen updated NH-2404: ----------------------------- Attachment: NH2404_Test.patch A test case to show the bug > 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 > Attachments: NH2404_Test.patch > > > 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 |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-17 22:31:46
|
[ http://216.121.112.228/browse/NH-2404?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo resolved NH-2404. ----------------------------- Resolution: Fixed Fix Version/s: 3.2.0Beta1 It was fixed few days ago, perhaps some weeks, fixing another issue... but I can't remember which one. > 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 > Fix For: 3.2.0Beta1 > > Attachments: NH2404_Test.patch > > > 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 |
From: Andrei A. (JIRA) <nh...@gm...> - 2011-05-20 21:20:36
|
[ http://216.121.112.228/browse/NH-2404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21138#action_21138 ] Andrei Alecu commented on NH-2404: ---------------------------------- Think it was NH2690 :) > 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 > Fix For: 3.2.0Beta1 > > Attachments: NH2404_Test.patch > > > 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 |
From: Andrei A. (JIRA) <nh...@gm...> - 2011-05-20 21:20:43
|
[ http://216.121.112.228/browse/NH-2404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21139#action_21139 ] Andrei Alecu commented on NH-2404: ---------------------------------- Oops, NH-2690. > 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 > Fix For: 3.2.0Beta1 > > Attachments: NH2404_Test.patch > > > 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 |