Ошибка mybatis: ошибка произошла при настройке параметровJAVA

Программисты JAVA общаются здесь
Anonymous
Ошибка mybatis: ошибка произошла при настройке параметров

Сообщение Anonymous »

Я использую следующий скрипт в Mybatis xml Mapper: < /p>

Код: Выделить всё

    
insert into note (id , text)
values

#{note.id}, #{note.text}

on conflict (id)
do update set
text = excluded.text

с параметром, определенным как в этой подписи: void upsert (@param ("notes") list notes);
и примечания pojo определяется как:

Код: Выделить всё

@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>
Версия базы данных - Postgresql16 < /code>,
mybatis импортируется из этой версии
org.mybatis.spring.boot:mybatis-spring-boot-starter:2.3.2

Как это решить?

Подробнее здесь: https://stackoverflow.com/questions/797 ... parameters

Вернуться в «JAVA»