go-gorm / optimisticlock

optimistic lock plugin for gorm
MIT License
88 stars 16 forks source link

ERROR: syntax error at or near \"=`\" (SQLSTATE 42601) #6

Closed angao closed 2 years ago

angao commented 2 years ago

GORM Playground Link

Description

The following error is reported when using postgres

ERROR: syntax error at or near \"=`\" (SQLSTATE 42601)

The sql as follows:

UPDATE
    instances
SET
    stage = 'Pending',
    version = `version` + 1,
    updated_at = '2022-03-28 18:15:24.572'
WHERE
    AND deleted_at IS NULL
    AND id = '123';
icpd commented 2 years ago

Fixed

angao commented 2 years ago

Fixed

thks, can you release a new version?

icpd commented 2 years ago

thks, can you release a new version?

Yes, it has been released. Plz upgrade to v1.0.7