我的查询不起作用。类型“double”不存在

时间:2016-05-11 12:10:12

标签: java spring hibernate postgresql jpa

我试过了:

def f( s , l1 , l2 ):
        if( l1 == [] and l2 == [] ):
                print s
                return
        if( l1 != [] ):
                f( s + l1[0] , l1[1:] , l2 )
        if( l2 != [] ):
                f( s + str(l2[0]) , l1 , l2[1:] )

但我有例外:

2016-05-11 14:58:05.773 ERROR 28016 --- [main] o.h.e.j.s.SqlExceptionHelper:错误:类型“double”不存在   位置:44 线程“main”中的异常org.springframework.orm.jpa.JpaSystemException:org.hibernate.exception.SQLGrammarException:无法提取ResultSet;嵌套异常是javax.persistence.PersistenceException:org.hibernate.exception.SQLGrammarException:无法提取ResultSet

有什么问题? 我使用Postgresql驱动程序。

更新 我的实体:

@Query("SELECT AVG(a.unitPrice) FROM ConnectwiseAgreementAdditions a WHERE a.agreementId = :agreementId " +
        "AND a.productId IN (SELECT p.id FROM ConnectwiseProductFindResult p " +
        "WHERE LOWER(p.subCategory) LIKE LOWER('%server%') " +
        "OR LOWER(p.subCategory) LIKE LOWER('%workstation%'))")
BigDecimal geAgreementDevicetUnitPrice(@Param("agreementId") Integer agreementId);

0 个答案:

没有答案
相关问题