current transaction is aborted, commands ignored until end of transaction block

current transaction is aborted, commands ignored until end of transaction blocksql

Error updating database. Cause: org.postgresql.util.PSQLException: ERROR: syntax error at or near "where"
Position: 36
### The error may involve com.project.mapper.PProjectLedgerMapper.updateByPrimaryKeySelective-Inline
### The error occurred while setting parameters
### SQL: update p_project_ledger where id = ?
### Cause: org.postgresql.util.PSQLException: ERROR: syntax error at or near "where"
Position: 36
; bad SQL grammar []; nested exception is org.postgresql.util.PSQLException: ERROR: syntax error at or near "where"數據庫

整個事務中,有SQL編譯失敗,致使整個事務被放棄停止。
聽說此異常捕獲無效,是數據庫層面的一種機制。app

原由是更新字段時,有更新字段值爲空,使用updateByPrimaryKeySelective時,自動過濾掉空字段,致使數據庫層面編譯錯誤。post

使用數據庫 postgreSQLspa

相關文章
相關標籤/搜索