Closed rlightner closed 2 years ago
Have you tried 6.0.0-preview5? https://www.nuget.org/packages/FlexLabs.EntityFrameworkCore.Upsert/6.0.0-preview5
For me it's works.
That's what I'm using currently, but official .NET 6.0 support would be nice
+1
Just for some breaking change if no one notice:
ModelExtensions.FindEntityType method seems no longer exists in EF Core 6. And causing exception for some operations depend on it (likeupsert
). I was just trying to make it a shot on MySql, not testing for other kind of databases.
There appears to be a breaking change on Npgsql for timestamp (i.e datetime) https://www.npgsql.org/doc/types/datetime.html
Datetimes as Unspecified need to be timestamp Datetimes as Local / Utc need to be timestampz
I have converted to timestampz, but even though my Datetimes are in UTC format they appear in the DB as local The issue is not apparent in EF Core SaveOrUpdate();
If Datetime property is Unspecified, then the Datetime is unfortunately not timestamp type
Soooo, looks like kind is being ignored for pg when generating sql.. This will be an issue later for many... FYA :-)
@artiomchi can you point me in the correct direction?
Another breaking change in 6.0 - the signature for GetServiceProviderHashCode()
has changed. It now returns an int
, not a long
. This causes a runtime exception when using EF Core 6. See this description for more details
There appears to be a breaking change on Npgsql for timestamp (i.e datetime) https://www.npgsql.org/doc/types/datetime.html
Datetimes as Unspecified need to be timestamp Datetimes as Local / Utc need to be timestampz
I have converted to timestampz, but even though my Datetimes are in UTC format they appear in the DB as local The issue is not apparent in EF Core SaveOrUpdate();
If Datetime property is Unspecified, then the Datetime is unfortunately not timestamp type
Soooo, looks like kind is being ignored for pg when generating sql.. This will be an issue later for many... FYA :-)
@artiomchi can you point me in the correct direction?
This is no longer an issue with npgsql 6.0.2
GetServiceProviderHashCode
@andrewlock. r u sure it is a problem? i can only find GetServiceProviderHashCode on ExtensionInfo : DbContextOptionsExtensionInfo
EfCore still has it as a long
So if EFCore change, there is an issue
no build issue for efcore latest, and DbContextOptionsExtensionInfo overide
@rsr-maersk yes, it's definitely an issue. I was trying to upgrade an application to EF Core 6 last night, and I ran into this error at runtime. You can see here that the EF Core has changed it to an int:
@andrewlock yes, after i updated the packages in the flex, issue arises, sorry, my bad
@andrewlock , what do you think? https://github.com/rsr-maersk/FlexLabs.Upsert/commit/1d15d3e1c2e50e5224fce1c30ef30c21285757fd
yes, after i updated the packages in the flex, issue arises, sorry, my bad
No problem! 🙂
what do you think? rsr-maersk@1d15d3e
Looks good to me! 👍 Thanks! :shipit:
@andrewlock also issue with AddEntityType :-/
Big thanks to @rsr-maersk for setting up the groundwork for the 6.0 change!
Also for flooding my mailbox with notifications, so that I got some time to finally release this!
I just pushed the change live and the new package can be found in NuGet!
+1