Pomelo.EntityFrameworkCore.MySql icon indicating copy to clipboard operation
Pomelo.EntityFrameworkCore.MySql copied to clipboard

EF Core 7 support

Open lauxjpn opened this issue 3 years ago • 4 comments

We will use this issue to track the progress on supporting EF Core 7, including its previews.

lauxjpn avatar Nov 10 '21 01:11 lauxjpn

With EF Core 7 making headway, are there any new features that this library hasn't implemented yet or should we be okay to start using EF Core 7?

JustinErdmier avatar Aug 25 '22 01:08 JustinErdmier

I'm getting:

Method not found: 'Void CoreTypeMappingParameters..ctor(System.Type, Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter, Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer, Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer, System.Func`3<Microsoft.EntityFrameworkCore.Metadata.IProperty,Microsoft.EntityFrameworkCore.Metadata.IEntityType,Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator>)'.

at Pomelo.EntityFrameworkCore.MySql.Storage.Internal.MySqlBoolTypeMapping..ctor(String storeType, Nullable``1 dbType, Nullable`1 size)\n at Pomelo.EntityFrameworkCore.MySql.Storage.Internal.MySqlTypeMappingSource..ctor(TypeMappingSourceDependencies dependencies, RelationalTypeMappingSourceDependencies relationalDependencies, IMySqlOptions options)\n

Any news on the support for EF 7?

glen-84 avatar Sep 10 '22 15:09 glen-84

I'm getting:

Method not found: 'Void CoreTypeMappingParameters..ctor(System.Type, Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter, Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer, Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer, System.Func`3<Microsoft.EntityFrameworkCore.Metadata.IProperty,Microsoft.EntityFrameworkCore.Metadata.IEntityType,Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator>)'.

at Pomelo.EntityFrameworkCore.MySql.Storage.Internal.MySqlBoolTypeMapping..ctor(String storeType, Nullable``1 dbType, Nullable`1 size)\n at Pomelo.EntityFrameworkCore.MySql.Storage.Internal.MySqlTypeMappingSource..ctor(TypeMappingSourceDependencies dependencies, RelationalTypeMappingSourceDependencies relationalDependencies, IMySqlOptions options)\n

Any news on the support for EF 7?

Hello all ,

I'm having the same issue on EF Core 6.0 on project build on SDK 7.0. Is it related to .NET 7 or am i missing something ?

Thanks in advance ! Regards

AlexCastroAlex avatar Sep 16 '22 04:09 AlexCastroAlex

FYI, MySqlConnector 2.2.0 Beta 1 is now available with .NET 7.0 support. (This shouldn't be required for EF Core 7.0--I think v2.1.13 should still work--but could be the new minimum dependency for Pomelo v7.x.)

Edit: 2.2.0-rc.1 is now available; targeting a 2.2 GA release when .NET 7 GA is out.

bgrainger avatar Sep 19 '22 05:09 bgrainger

The current plan is to have basic EF Core 7 support out on Monday.

lauxjpn avatar Oct 19 '22 06:10 lauxjpn

Just to know, what about JSON Columns support? will it be included?

meriturva avatar Oct 20 '22 12:10 meriturva

Pomelo provider already has support for JSON. See similar issue with Npgsql provider at https://github.com/npgsql/efcore.pg/issues/2452.

mguinness avatar Oct 20 '22 17:10 mguinness

Hi there ! any news on EF 7 support as it was supposed to be on monday ?

Reagrds

AlexCastroAlex avatar Oct 25 '22 07:10 AlexCastroAlex

@AlexCastroAlex It is going to take us a couple of days longer. There will be a PR on Wednesday, to track the progress. Something testable should be available at the end of the week.

lauxjpn avatar Oct 25 '22 09:10 lauxjpn

@AlexCastroAlex It is going to take us a couple of days longer. There will be a PR on Wednesday, to track the progress. Something testable should be available at the end of the week.

Thanks for answer ! strength and honor !

Regards

AlexCastroAlex avatar Oct 25 '22 09:10 AlexCastroAlex

The PR to track the progress is #1717. I expect the remaining test to have become green in the next few days.

lauxjpn avatar Oct 30 '22 19:10 lauxjpn

@lauxjpn any updates for this week?

ekjuanrejon avatar Nov 07 '22 04:11 ekjuanrejon

Tomorrow we'll see .NET 7. Do we need rc2 release?

VladislavAntonyuk avatar Nov 07 '22 06:11 VladislavAntonyuk

Hi,

Just upgrading to .NET 7 / EF Core 7 and it seems the latest version of Pomelo.EntityFrameworkCore.MySql version 6.0.2 does not support it

<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.2" />

I get the following as my only error:

Build FAILED.

error NU1608: Detected package version outside of dependency constraint: Pomelo.EntityFrameworkCore.MySql 6.0.2 requires Microsoft.EntityFrameworkCore.Relational (>= 6.0.7 && < 7.0.0) but version Microsoft.EntityFrameworkCore.Relational 7.0.0 was resolved.

solrevdev avatar Nov 08 '22 19:11 solrevdev

Hi,

Just upgrading to .NET 7 / EF Core 7 and it seems the latest version of Pomelo.EntityFrameworkCore.MySql version 6.0.2 does not support it

<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.2" />

I get the following as my only error:

Build FAILED.

error NU1608: Detected package version outside of dependency constraint: Pomelo.EntityFrameworkCore.MySql 6.0.2 requires Microsoft.EntityFrameworkCore.Relational (>= 6.0.7 && < 7.0.0) but version Microsoft.EntityFrameworkCore.Relational 7.0.0 was resolved.

same issue as you

zivfuture avatar Nov 09 '22 03:11 zivfuture

Blocked from upgrading due to this as well, i know oss development is often a thankless job so let me start off by saying: Thanks for all the work you do! However if you have any timeline for a preview package even if its a ways of it would be very helpful :)

aL3891 avatar Nov 09 '22 06:11 aL3891

Please stop spamming this issue. There is a work-in-progress PR (#1717).

glen-84 avatar Nov 09 '22 10:11 glen-84

I'm using 7.0.0-alpha.1 version.

I'll give you feedback about this version.

Great work!!

mapo80 avatar Nov 16 '22 09:11 mapo80

Prerelease 7.0.0-alpha.1 (compatible with EF Core 7.0.0) is now available on nuget.org.

This includes full support for all features of EF Core 7. We also completed migration and scaffolding support for MariaDB sequences.

While this is an alpha release, it is backed by over 26,000 tests.

The current plan is to release a 7.0.0-beta.1 version in a week and a stable official version by the end of the month.

lauxjpn avatar Nov 16 '22 13:11 lauxjpn

Database is created but tables are not created

areltasarim avatar Nov 18 '22 11:11 areltasarim

Database is created but tables are not created

Check if all your tables(your model) have Primary key as i had an issue related to EF Core 7.0 forcing to have Primary Keys

alexandrecastro-bib avatar Nov 18 '22 11:11 alexandrecastro-bib

I have 2 complex business applications each with fairly complex databases and comprehensive integration test suites, all work well with 7.0.0-alpha.1. As always, even with ORM, having the code first model design conforming to database normalization is good for many things. I was not aware of EF Core 7.0 forcing to have Primary Keys, however, I do think this is a good move. Google "entity framework normalization database" you can find many good posts.

zijianhuang avatar Nov 18 '22 20:11 zijianhuang

all my id fields are like this anyway

[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]

Microsoft.EntityFrameworkCore.Model.Validation[10400]
      Sensitive data logging is enabled. Log entries and exception messages may include sensitive application data; this mode should only be enabled during development.
19.11.2022 00:29:38.840 CoreEventId.SensitiveDataLoggingEnabledWarning[10400] (Microsoft.EntityFrameworkCore.Infrastructure) 
      Sensitive data logging is enabled. Log entries and exception messages may include sensitive application data; this mode should only be enabled during development.
19.11.2022 00:29:39.871 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command) 
      Executed DbCommand (14ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
      SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='paros' AND TABLE_NAME='__EFMigrationsHistory';
19.11.2022 00:29:39.883 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command) 
      Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
      SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='paros' AND TABLE_NAME='__EFMigrationsHistory';
19.11.2022 00:29:39.935 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command) 
      Executed DbCommand (12ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
      SELECT `MigrationId`, `ProductVersion`
      FROM `__EFMigrationsHistory`
      ORDER BY `MigrationId`;
19.11.2022 00:29:39.952 RelationalEventId.MigrationsNotApplied[20405] (Microsoft.EntityFrameworkCore.Migrations) 
      No migrations were applied. The database is already up to date.
Done.

tables are not created

areltasarim avatar Nov 18 '22 21:11 areltasarim

@areltasarim Create a new issue w/ an example project so it can be looked into.

mguinness avatar Nov 19 '22 05:11 mguinness

You can download the project from the link below

https://github.com/areltasarim/Pomelo

the default project as in the picture below EticaretWebCoreMigrationMysql Let's make an update database by selecting

Başlıksız-1

areltasarim avatar Nov 19 '22 09:11 areltasarim

You can download the project from the link below

https://github.com/areltasarim/Pomelo

the default project as in the picture below EticaretWebCoreMigrationMysql Let's make an update database by selecting

Başlıksız-1

I can't access your project but did you generate your first migration ? If not, this is why you don't have tables.

alexandrecastro-bib avatar Nov 19 '22 09:11 alexandrecastro-bib

you can access the project now

https://github.com/areltasarim/Pomelo

areltasarim avatar Nov 19 '22 09:11 areltasarim

normally I did add-migration in my project, but I forgot this in the project I sent you, you add-migration first

areltasarim avatar Nov 19 '22 10:11 areltasarim

re-updated the project can you download again

areltasarim avatar Nov 19 '22 10:11 areltasarim

@areltasarim I moved your conversation to the new issue #1726.

Please keep this issue here clean, since it is being tracked by other members of the community as well. Always open a new issue, if you encounter specific problems. Thank you.

lauxjpn avatar Nov 19 '22 10:11 lauxjpn