pg icon indicating copy to clipboard operation
pg copied to clipboard

Update omit zero when no fields produces invalid syntax

Open mgazza opened this issue 4 years ago • 1 comments

https://github.com/go-pg/pg/blob/691def15f539b232452a5c982c08c5804b52bef1/orm/update_test.go#L59

When updating and the model contains all empty fields invalid update syntax is produced.

Suggest returning specific error to capture the case of a non-update

mgazza avatar Dec 17 '21 13:12 mgazza

https://github.com/go-pg/pg/pull/1940

mgazza avatar Dec 17 '21 14:12 mgazza