pg icon indicating copy to clipboard operation
pg copied to clipboard

Basic Update statement with increment value not working

Open IvRRimum opened this issue 4 years ago • 0 comments

Issue tracker is used for reporting bugs and discussing new features. Please use Discord or stackoverflow for supporting issues.

Expected Behavior

Should increment amount

Current Behavior

Does not increment amount

Steps to Reproduce

_, err := j.DB.Model((*orm.Wallet)(nil)).Exec(`
UPDATE wallets SET amount = amount + 1, updated_at = ? WHERE id = ?
`, time.Now(), tx.Wallet.ID)

Context (Environment)

I cant increment value

IvRRimum avatar Nov 24 '21 11:11 IvRRimum