-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
MySqlException with EF Core Code First and LINQ nested query #23932
Comments
@lauxjpn - Thoughts? |
@tokyo1985 You are using Oracle's EF Core provider, so I can't comment specifically here, since I am the maintainer of Pomelo.EntityFrameworkCore.MySql. That being said, it looks like Oracle's provider does not translate In If you cannot upgrade your database server, you have the following options:
If you can switch to Pomelo, but cannot upgrade your database server, you have the additional option to:
|
@lauxjpn - Sorry, my mistake, I did not see it was different MySql provider. |
@tokyo1985 @lauxjpn Notice that ef core 5 split query does not support subqueries. Thus I don't think split query can help. |
@tokyo1985 |
Would I get exception with Pomelo and MySQL 5.7? |
Am closing this as an external issue that isn't related to EF Core itself (but feel free to continue the conversation, of course!). |
@tokyo1985 Yes, you would get an exception (though a different one telling you what the problem is). It's because:
|
Hi,
I developed the DB context for MySQL 5.7.33 and entity models using Entity Framework Core 3.1.1 Code First
When I execute the following method with nested LINQ queries:
I receive the following exception and stacktrace:
MySqlException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OUTER APPLY ( SELECT
d
.ID
,d
.Name
,d
.Label
,t0
.Response
' at line 12EF Core version: 3.1.1
Database: MySQL 5.7.33
Database provider: MySql.Data.EntityFrameworkCore 8.0.22
Target framework: .NET Core 3.1.0
Operating system: Windows 10
IDE: Visual Studio 2019 16.8.30907.101
I also verified that Exception does not occur when I use the SQL Server 2019 and Microsoft.EntityFrameworkCore.SqlServer.
Is it a bug? If no, how can I fix the issue above?
I need a feedback soon.
Thank you for attention.
The text was updated successfully, but these errors were encountered: