Open rabberbock opened 3 years ago
Hello @rabberbock ,
Thank you for reporting, we will look at it.
Unfortunately, DateTime in ProgreSQL always has been a mess with all this kind of changes ;(
Best Regards,
Jon
Also, there seems to be an issue with BulkUpdate as well. Probably the same underlying issue, but wanted to note that as well. Thanks!
Hello @rabberbock ,
Yup, all these kinds of issues are related.
A fix has been already merged and will be available next Tuesday.
Best Regards,
Jon
@JonathanMagnan Awesome, thanks so much!
Hello @rabberbock ,
The v5.2.14 has been released.
Could you try it and let us know if everything behaves as expected?
Best Regards,
Jon
Please ping me here if you need any sort of assistance from the Npgsql side... I know the changes in 6.0.0 are painful, but I'm hoping this cleans up the mess once and for all.
@JonathanMagnan I tested it out with 6.0.0-rc.2.21480.5-1
and it worked perfectly. Thanks!
Hello,
I got the same problem with the DateTimeOffset type as there is no .ToUniversalTime()
call for this type.
I think it would make sense to support this for postgres.
@JonathanMagnan do you think this is possible?
Hello @Grubana ,
Do you think you could create a runnable project with the issue? It doesn’t need to be your project, just a new solution with the minimum code to reproduce the issue. You can send it in private here: info@zzzprojects.com
My developer didn't really find any issue / is not sure exactly what your problem is.
Best Regards,
Jon
Description
The Npgsql Ef Core library made some breaking changes for the default mapping of DateTime. See Release Notes.
When I try a BulkInsert it fails, however a regular Add with SaveChanges works fine.
Exception
If you are seeing an exception, include the full exceptions details (message and stack trace).
Fiddle or Project (Optional)
https://github.com/rabberbock/EfCoreBulkInsertDateTime/tree/master
Further technical details
I suspect this may have to do with the temporary table that is being created under the hood, the DateTime in the temporary table may be
timestamp without time zone
when it is supposed to betimestamp with time zone
. Just a thought.Thanks for your help!