小编Rob*_*ira的帖子

"运算符不存在:uuid = bytea"与Postgres的Java

我在引用此查询时遇到问题.在Postgres上,此查询执行时没有错误.在JAVA上,它抛出以下异常:

javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
cause
org.postgresql.util.PSQLException: ERROR: operator does not exist: uuid = bytea
  Note: No operator matches the given name and argument type(s). You might need to add explicit type casts.
  Position: 404
Run Code Online (Sandbox Code Playgroud)

我所做的?

我的方法:

public List<CivilRecord> dashboardSearch(CivilRecordSearch civilRecordSearch)
    throws MessageException {
    SearchValidation.validateDashboardSearch(civilRecordSearch);
    List<CivilRecord> l = new ArrayList<>();
    try {
        StringBuilder query = new StringBuilder();
        // query.append("select
        // c.id_civil_record\\:\\:text,c.nm_request,c.nm_rg,c.tx_name,c.dt_register,c.bl_priority
        // ");
        query.append("select c.id_civil_record,c.nm_request,c.nm_rg,c.tx_name,c.dt_register,c.bl_priority ");
        query.append("from sc_civil.tb_civil_record c ");
        query.append("inner join sc_civil.tb_workflow_record w ");
        query.append("on w.id_civil_record = …
Run Code Online (Sandbox Code Playgroud)

java postgresql select jpa

3
推荐指数
2
解决办法
1万
查看次数

标签 统计

java ×1

jpa ×1

postgresql ×1

select ×1