Skip to content

Basic Update statement with increment value not working #1931

@IvRRimum

Description

@IvRRimum

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions