Skip to content
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

MySQL onConflictUpdate with column renames #2707

Closed
joelsonoda opened this issue Feb 17, 2023 · 0 comments · Fixed by #2708
Closed

MySQL onConflictUpdate with column renames #2707

joelsonoda opened this issue Feb 17, 2023 · 0 comments · Fixed by #2708

Comments

@joelsonoda
Copy link
Contributor

joelsonoda commented Feb 17, 2023

This template isn't a strict requirement to open issues, but please try to provide as much information as possible.

Version: 3.9.0-4.6.0
Module: quill-sql
Database: mysql

Expected behavior

onConflictUpdate should produce valid conflict tokens (for example, column = values(column)) when a querySchema with renames is defined (schemaMeta/tableQuery).

Actual behavior

onConflictUpdate produces conflict tokens that result in the columns not being updated when there are renames specified in the table schema. (for example, column = column

Steps to reproduce the behavior

When the mysql dialect is used, define either a tableQuery or schemaMeta with at least one column rename, then reference the renamed column in an OnConflict.

https://scastie.scala-lang.org/3JwFDGEbSh6Zs5Z07f7YUg

Workaround

joelsonoda pushed a commit to joelsonoda/zio-quill that referenced this issue Feb 21, 2023
joelsonoda pushed a commit to joelsonoda/zio-quill that referenced this issue Feb 21, 2023
…Use values for renamed columns in onConflictUpdate. (zio#2707)
joelsonoda added a commit to joelsonoda/zio-quill that referenced this issue Feb 21, 2023
joelsonoda added a commit to joelsonoda/zio-quill that referenced this issue Feb 21, 2023
…Use values for renamed columns in onConflictUpdate. (zio#2707)
joelsonoda added a commit to joelsonoda/zio-quill that referenced this issue Feb 21, 2023
joelsonoda added a commit to joelsonoda/zio-quill that referenced this issue Feb 21, 2023
…Use values for renamed columns in onConflictUpdate. (zio#2707)
joelsonoda added a commit to joelsonoda/zio-quill that referenced this issue Jun 27, 2023
…Use values for renamed columns in onConflictUpdate. (zio#2707)
juliano added a commit that referenced this issue Jul 1, 2023
…Use values for renamed columns in onConflictUpdate. (#2707) (#2708)

Co-authored-by: Juliano Alves <von.juliano@gmail.com>
jilen pushed a commit that referenced this issue Jun 11, 2024
…Use values for renamed columns in onConflictUpdate. (#2707) (#2708)

Co-authored-by: Juliano Alves <von.juliano@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant