volatiletech / sqlboiler

Generate a Go ORM tailored to your database schema.
BSD 3-Clause "New" or "Revised" License
6.66k stars 539 forks source link

Upsert with greylist in updateColumns results in invalid SQL #1292

Open yourtallness opened 1 year ago

yourtallness commented 1 year ago

What version of SQLBoiler are you using (sqlboiler --version)?

v4.14.0

What is your database and version (eg. Postgresql 10)

PG 15

Passing a greylist to the update columns in an Upsert operation results in:

sqbmodel: unable to upsert posts: ERROR: syntax error at or near "=" (SQLSTATE 42601)

The generated query is invalid, including 2 extra columns fields (I included 2 columns in the greylist):

"created_at" = EXCLUDED."created_at","updated_at" = EXCLUDED."updated_at", = EXCLUDED., = EXCLUDED
stephenafamo commented 1 year ago

Can you add an example schema and code?