Код: Выделить всё
insert into note (id , text)
values
#{note.id}, #{note.text}
on conflict (id)
do update set
text = excluded.text
и заметки pojo defined as:
@Data
@Builder
public class Note {
private Long id;
private String text;
}
< /code>
Но я получаю ошибку: < /p>
Код: Выделить всё
### The error occurred while setting parameters
### SQL: insert into note (id , text) values ( ?, ? ),,( ?, ? ) on conflict (id) do update set text = excluded.text
### Cause: org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block
; uncategorized SQLException; SQL state [25P02]; error code [0]; ERROR: current transaction is aborted, commands ignored until end of transaction block]
2025-10-02T14:31:52.950+04:00 ERROR 60407 --- [ executor-1] r.c.c.b.service.LocationDatabaseService : Something goes wrong on media initialization
< /code>
База данных - PostgreSQL 16, Mybatis импортируется из этой версии
org.mybatis.spring.boot:mybatis-spring-boot-starter:2.3.2Подробнее здесь: https://stackoverflow.com/questions/797 ... parameters
Мобильная версия