【发布时间】:2020-10-12 23:16:36
【问题描述】:
本机查询:
1. SELECT * from test where path <@ 'a.b.c' and path <> 'a.b.c';
2. SELECT * FROM test WHERE path ~ '*.b.c.*{1}'
JPA:
@Query(value = "select * from test where path <@ 'a.b.c' and path <> 'a.b.c'", nativeQuery = true)
List<Test> getAllPath(@Param("pathToSearch") String pathToSearch);
我想用 pathToSearch 参数替换 a.b.c
错误:
Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: ltree <@ character varying
Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
【问题讨论】:
标签: postgresql spring-boot hibernate jpa spring-data-jpa