我在引用此查询时遇到问题.在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)