cero-t/sqltemplate

UUIDのオブジェクトへのマッピングに失敗する

Closed this issue · 0 comments

環境

OS:Microsoft Windows 10 Pro
Java:JDK17
フレームワーク:SpringBoot 3.2
DB:PostgreSQL 15.4

事象

UUIDの型を含むrecordクラスにマッピングすると、以下のエラーが発生します。

Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: uuid = character varying
  ヒント: No operator matches the given name and argument types. You might need to add explicit type casts.
  位置: 176
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2713)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2401)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:368)
	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:498)
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:415)
	at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:190)
	at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:134)
	at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
	at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:732)
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:658)```