Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/399.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 使用Postrges时Spring JPA查询中的嵌套选择_Java_Spring_Postgresql_Jpa - Fatal编程技术网

Java 使用Postrges时Spring JPA查询中的嵌套选择

Java 使用Postrges时Spring JPA查询中的嵌套选择,java,spring,postgresql,jpa,Java,Spring,Postgresql,Jpa,在SpringJPA存储库中,我有以下方法 @Query("select e from Entity e where e.enabled = true and e.id in :ids and (select count(*) from SubEntity se where se.e = e and se.date = :date) = 0") public Page<Entity> query(@Param("date") String date, @Param("ids"

在SpringJPA存储库中,我有以下方法

@Query("select e from Entity e where e.enabled = true and e.id in :ids and (select count(*) from SubEntity se where se.e = e and se.date = :date) = 0")
    public Page<Entity> query(@Param("date") String date, @Param("ids") List<Long> ids, Pageable pageable);

原因可能是什么?

尝试记录实际的SQL运行,以便查看SQL无效的原因。感谢您的建议,传递的ID列表为空。
Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near ")"
  Position: 123