-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Global Query Filter with reference to same entity #17253
Comments
The exception message comes from #17111 Regardless, this filter may not be allowed due to infinite recursion. We apply query filters to the dbsets used inside query filter. So this filter would recursively load filter for MyEntity which would cause stackoverflow. |
Yes, EF should not load a filter when inside that same filter. |
When expanding defining query and/or query filters in nav rewrite we now replace instances of EntityQueryable of the entity for which defining query (or filter) is expanded into NavigationExpansionExpressions - this way we don't recursively try to visit and expand them.
When expanding defining query and/or query filters in nav rewrite we now replace instances of EntityQueryable of the entity for which defining query (or filter) is expanded into NavigationExpansionExpressions - this way we don't recursively try to visit and expand them.
When expanding defining query and/or query filters in nav rewrite we now replace instances of EntityQueryable of the entity for which defining query (or filter) is expanded into NavigationExpansionExpressions - this way we don't recursively try to visit and expand them.
When expanding defining query and/or query filters in nav rewrite we now replace instances of EntityQueryable of the entity for which defining query (or filter) is expanded into NavigationExpansionExpressions - this way we don't recursively try to visit and expand them.
fixed in d0b21ed |
Great. |
When expanding defining query and/or query filters in nav rewrite we now replace instances of EntityQueryable of the entity for which defining query (or filter) is expanded into NavigationExpansionExpressions - this way we don't recursively try to visit and expand them.
I met the same problem as you mentioned above. How did you solve it? Can you tell me @taisbak |
We have a corebanking system with a number (1200) of 'time series' tables with columns like this
Id, Timestamp, value1, value2 ...
The most recent row per Id represent the current state. Each time a row is logically updated, a new row is inserted.
We would like to add a filter, which retrieves the most recent rows:
Unfortunately, it causes the following exception:
Steps to reproduce
Small program that illustrates the problem and throws exception above:
Further technical details
EF Core version: 3.0.0-preview9.19418.1
Database Provider: Microsoft.EntityFrameworkCore.SqlServer
Operating system: Windows 10
IDE: Visual Studio 2019 16.3.0 preview 2.0
We really hope for a resolution, as it would simplify coding against the tables tremendously ;-)
Kind regards,
Simon
The text was updated successfully, but these errors were encountered: