-
Notifications
You must be signed in to change notification settings - Fork 19
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
Filtering using Contains throws UnreachableException #41
Comments
I have also run into this same problem. |
@ajcvickers - I know your time is limited and I'm hoping you might be able to help point me in the right direction on how to resolve this error. I've spent some time trying to research this issue and can deduce that I need to add some handling now for the |
I was able to get around this issue by adding the following to the ConfigureConventions of my DBContext:
This uses the built-in LocalDateValueConverter that is defined in this repo. |
@StevenRasmussen I've put it on my personal backlog and hopefully I'll get some time to look soon. |
@ajcvickers - With v9 being released might you have any time to take a look into this issue? Thanks! |
@StevenRasmussen It's still on my list but I have been out sick for several months and have just got back. The holiday period is coming up, so that should give me some time to catch up. |
@ajcvickers - Sorry to hear about your health... never fun. I'm glad that you're doing better. Thanks so much for your assistance! |
Hello,
First of all, great library. Thanks for all your hard work!
After updating EF Core from 7.x to 8.04. and this library from 7.x to 8.0.1, I've encountered an error when trying to filter on
LocalDate
properties usingContains
:The above code will throw the following exception:
The same happens for other NodaTime types, e.g. LocalTime.
Since the method throwing the exception is called
ApplyTypeMappingsOnOpenJsonExpression
, my guess is that's related to how EF Core 8 has changed generating SQL forContains
with parameter collections (it's now usingOPENJSON
instead ofIN
). More information can be found here.This error doesn't occur when instead of using this library a custom converter for
LocalDate
is used:I've prepared a POC showing both cases:
https://github.com/rt-tidaro/EfCoreNodaTimeContainsBugPoc
Thanks for help!
The text was updated successfully, but these errors were encountered: