-
Notifications
You must be signed in to change notification settings - Fork 933
Have IFutureEnumerable.GetEnumerable executing immediatly the query #1665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Have IFutureEnumerable.GetEnumerable executing immediatly the query #1665
Conversation
Are you going to release 5.0.5? |
I am not decided yet. 5.0.4 has just been shipped, of course if I had known I would have delayed it slightly for putting this into it. What do you think? Do I add a release commit here and proceed with release? |
@fredericDelaporte you have closed #1663. Do you still intend to release this fix? Is it required?
Yes,
As you wish - depends on your decision. |
I was forgetting this question. #1663 was about another subject on Future, for which I was telling to solve it on user side by calling |
From a #1718 comment:
This change has been made when implementing async. Implementing directly
This would need to be a new additional method. |
Posting here my original concern to keep all details in one place: nhibernate-core/src/NHibernate/IFutureEnumerable.cs Lines 10 to 12 in dc71c7d
IMHO from this description it's not clear that suggested refactoring changes behavior: public IEnumerable<TBase> GetLazyList()
{
return session.Query<SubParent1>().Future<TBase>().Concat(session.Query<SubParent2>().Future())
} So lazy method above become non lazy after suggested refactoring. And the query above can't be re-written in lazy way without wrapping this code in some custom user lazy enumerator. |
But I'm not referring to this description.
Pretty straightforward suggestion. I would not expect that suggestion to use something else also changes initial behavior (so it's unlikely I will double check comments on GetEnumerable()) |
Then propose a PR for adding an additional deferred method and changing the obsolete message. |
As raised in #1663,
IFutureEnumerable.GetEnumerable
does not actually execute the query, it is still a deferredIEnumerable
. This contradicts its purpose and xml comment:As this member has been introduced in 5.0, this PR targets the 5.0.x branch.
Update: the async file has been generated with the 0.8.2.1 AsyncGenerator instead of the 0.6.0, which cannot run with a recent MSBuild.