From: Steve B. (JIRA) <nh...@gm...> - 2011-05-11 13:32:02
|
[ http://216.121.112.228/browse/NH-2690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21053#action_21053 ] Steve Bohlen commented on NH-2690: ---------------------------------- Applying your changes to the trunk in order to create a patch isn't that hard -- just do the following and you should be fine: 1) checkout source from SVN into a completely new folder location 2) copy the entire source tree in which you made your edits to the clipboard 3) paste it into the checked-out folder hierarchy, selecting OVERWRITE/REPLACE as the method to resolve file/folder conflicts 4) build your patch based on the resultant source (after you verify that it still all builds/tests pass of course) Step #3 will properly integrate your changes into the checked-out source from SVN. Let us know if you have any troubles with this approach. > Linq Select() broken with .ToFuture() > ------------------------------------- > > Key: NH-2690 > URL: http://216.121.112.228/browse/NH-2690 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.1.0 > Reporter: Kelly Stuard > Priority: Major > Attachments: NH2690.zip > > > //Given the following: > var query = > from cat in session.Query<Cat>() > select new > { > Id = cat.Id, > Name = cat.Name, > }; > //This works: > var result1 = query.ToList(); > //But this does not: > var queryResults = query.ToFuture().ToList(); > Exception: > NHibernate.HibernateException was unhandled > Message=Failed to execute multi query: [select cat0_.Id as col_0_0_, cat0_.Name as col_1_0_ from Cat cat0_; > ] > Source=NHibernate > StackTrace: > at NHibernate.Impl.MultiQueryImpl.DoList() > at NHibernate.Impl.MultiQueryImpl.ListIgnoreQueryCache() > at NHibernate.Impl.MultiQueryImpl.List() > at NHibernate.Impl.FutureQueryBatch.GetResultsFrom(IMultiQuery multiApproach) > at NHibernate.Impl.FutureBatch`2.GetResults() > at NHibernate.Impl.FutureBatch`2.get_Results() > at NHibernate.Impl.FutureBatch`2.GetCurrentResult[TResult](Int32 currentIndex) > at NHibernate.Impl.FutureBatch`2.<>c__DisplayClass4`1.<GetEnumerator>b__3() > at NHibernate.Impl.DelayedEnumerator`1.<get_Enumerable>d__0.MoveNext() > at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) > at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) > at NHibernate.Test.NHSpecificTest.NH1234.SampleTest.ShouldBeAbleToFutureSelectOntoAnonymous() in C:\Users\kstuard\Desktop\NH2540\NHibernate.Test\NHSpecificTest\NH1234\SampleTest.cs:line 97 > at ConsoleApplication2.Program.Main(String[] args) in C:\Users\kstuard\Desktop\NH2540\ConsoleApplication2\Program.cs:line 16 > at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) > at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() > at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx) > at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) > at System.Threading.ThreadHelper.ThreadStart() > InnerException: System.ArgumentException > Message=The value "System.Object[]" is not of type "<>f__AnonymousType0`2[System.Int32,System.String]" and cannot be used in this generic collection. > Parameter name: value > Source=mscorlib > ParamName=value > StackTrace: > at System.ThrowHelper.ThrowWrongValueTypeArgumentException(Object value, Type targetType) > at System.Collections.Generic.List`1.System.Collections.IList.Add(Object item) > at NHibernate.Impl.MultiQueryImpl.DoList() > InnerException: > This works fine if I select directly to typeof(Cat). Future is such a wonderful tool; it would be great if it worked in this scenario. > I will attach test cases used to generate this exception, shortly. -- 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 |