-
-
Notifications
You must be signed in to change notification settings - Fork 314
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
Problem with FromCache in EF8 when use "contains" (translated to openJson) #792
Comments
Here some real example: Consider the table Tbl with records:
First Call:
The query generated of EF < 8 or EF8 with UseCompatibilityLevel(120) is
The query generated by EF 8 without UseCompatibilityLevel(120) is
In both cases result is
Second call:
The query generated of EF < 8 or EF8 with UseCompatibilityLevel(120) is
and return
But in EF8 without UseCompatibilityLevel(120) uses previous cached version (with listA), so result is
|
Hello @fenomeno83 , Thank you for reporting. We haven't tested it yet, but indeed we understand very well how this new We will look at it. Best Regards, Jon |
Hello @fenomeno83 , Just to let you know that a fix has been merged in our master. The fix will be available on next Tuesday 13. Best Regards, Jon |
Hello @fenomeno83 , A new version is now available. The latest release note now contains this fix: https://github.com/zzzprojects/EntityFramework-Plus/releases/tag/8.102.1.0 Let us know if everything works as expected. Best Regards, Jon |
Hi.
I've upgraded to EF8 but I've problems when i use "List.contains(column)".
In EF8, "contains" is translated to "openjson" (vs "IN(...)" of the previous versions).
If some values in List that makes contains,change, fromcache of Z.entityframework.plus doesn't understand the changes and it doesn't make new query, but uses a cached query (for example, if ListA.Contains(column) is cached and I do a new query with ListB.Contains(column), it returns old cached ListA.Contains(column) results and doesn't make a new query for ListB.Contains(column)...maybe fromcache doesn't manage properly openjson?).
I've solved with UseCompatibilityLevel(120) in dbcontext configuration; in this manner it doesn't use openjson but "old" translation in "IN(...)", and fromcache, as usual, understand changes in List.
Can you solve that issue?
The text was updated successfully, but these errors were encountered: