-
Notifications
You must be signed in to change notification settings - Fork 0
Override RETURNING operation methods for EF Core 10 compatibility #101
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
Conversation
Co-authored-by: renemadsen <[email protected]>
|
@copilot now we have these errors left: |
Co-authored-by: renemadsen <[email protected]>
|
@copilot good, now we have this error:
|
Co-authored-by: renemadsen <[email protected]>
Fixed in commit 326f46a. Changed all three methods from |
|
@copilot this resulted in these errors: |
Co-authored-by: renemadsen <[email protected]>
... Fixed in commit c94cf77. The base class has different access modifiers for each method: |
|
@copilot more errors: |
... These are EF Core 10 test infrastructure breaking changes, separate from the RETURNING methods issue. The test base classes ( The main source code compilation issues (RETURNING methods in |
EF Core 10 changed the SQL generator base class hierarchy.
MySqlUpdateSqlGeneratorneeds to overrideAppendInsertReturningOperation,AppendUpdateReturningOperation, andAppendDeleteReturningOperationwhich are defined as virtual methods in the baseUpdateSqlGeneratorclass with different access modifiers.Changes
AppendInsertReturningOperation: Generates INSERT with RETURNING clause whenServerVersion.Supports.Returning(MySQL 8.0.21+), otherwise delegates to base class for INSERT+SELECT pattern. Usespublic overrideto match base class public virtual method.AppendUpdateReturningOperation: Generates UPDATE with RETURNING clause for computed columns or concurrency checking (returns "1" constant when no read operations). Usesprotected overrideto match base class protected virtual method.AppendDeleteReturningOperation: Generates DELETE with RETURNING "1" for concurrency verification. Usesprotected overrideto match base class protected virtual method.AppendUpdateOperationoverride: Routes to RETURNING-based implementation when supportedAll methods properly override the base class virtual methods using the correct access modifiers (
public overridefor Insert,protected overridefor Update and Delete), preserve existing MySQL customizations (empty column list handling, VALUES syntax), and maintain backward compatibility with pre-8.0.21 versions.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.