Java HQL查询使用postgres选择xpath
我有以下疑问Java HQL查询使用postgres选择xpath,java,spring,spring-data-jpa,postgresql-9.4,jpa-2.1,Java,Spring,Spring Data Jpa,Postgresql 9.4,Jpa 2.1,我有以下疑问 select coalesce(array_length(xpath('/packet/presentation/set/Data/Biometric/Record', xmlparse(content payload)), 1), 0) as table_count, punch_count from udm_device_upload_file where punch_count = 0 and attestation_id is null 我想把这个查询转换成HQ
select coalesce(array_length(xpath('/packet/presentation/set/Data/Biometric/Record', xmlparse(content payload)), 1), 0) as table_count, punch_count
from udm_device_upload_file where punch_count = 0 and attestation_id is null
我想把这个查询转换成HQL查询,但是我得到了一个错误。因为在我的查询中有一些函数,例如xpath
,xmlparse
,array\u length
,所以是否可以将其转换
HQL查询:
select upf.punchCount, coalesce(array_length(xpath('/packet/presentation/set/Data/Biometric/Record', xmlparse(content upf.payload)), 1), 0) as upf.bioMetricCount"
+ " from UploadFile upf where upf.punchCount=:punchCount and upf.attestationId IS NULL