Repository navigation
Count a projected and included collection once - #35
Merged
Merged
Conversation
MaxSingleQueryCollections adds the collections Includes name to the
collections a projection returns. A query can name one collection both
ways:
.Include("Tasks.Employee")
.Select(_ => new Employee { Id = _.Id, Tasks = _.Tasks.ToList() })
The Include there only says what to load under the collection the
projection returns, so one collection is loaded, and it was counted as
two.
An Include path is no longer counted when the projection returns that
collection from the same row. Both still count when the projection
returns the row itself as well, since the Include then loads the
collection into it a second time. A further collection included under
the projected one still counts.
Version 0.7.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MaxSingleQueryCollectionsadds the collections Includes name to the collections a projection returns. A query can name one collection both ways:The
Includethere only says what to load under the collection the projection returns. One collection is loaded, and it was counted as two.Change
An
Includepath is no longer counted when the projection returns that collection from the same row.Still counted:
Includethen loads the collection into it a second time.Impact
A count can only go down, so no query starts to log or throw.
Changes
CollectionCounterrecords the collections a projection returns, by the path anIncludewould name them with.ShapeTests.