Java Postgres查询必须是布尔类型

Java Postgres查询必须是布尔类型,java,postgresql,jdbi,Java,Postgresql,Jdbi,我正在使用skife帮助进行数据库查询。我有下面的查询和方法 @SqlQuery("select * from profile where profile_id >= :from and profile_id < :to") List<Profile> findAllInRange(@Bind("from")int from, @Bind("to")int to); 但是如果我执行这个查询 select * from profile where profile_id &

我正在使用skife帮助进行数据库查询。我有下面的查询和方法

@SqlQuery("select * from profile where profile_id >= :from and profile_id < :to")
List<Profile> findAllInRange(@Bind("from")int from, @Bind("to")int to);
但是如果我执行这个查询

select * from profile where profile_id >= 1 and profile_id < 50
从profile\u id>=1且profile\u id<50的profile中选择*
我的RDBMS成功返回结果

我错过了什么?

归功于米米格尔姆


我需要将
\\
放在
之前,将其解析为boolean@ja08prat这是什么意思?很抱歉,我没有遵循。请在“@MinMiguelM为什么这样做会起作用?”之前使用put\\JamalH,因为)中的profile_id,因此,如果不是出于此目的,是否有必要忽略它背景是什么?更新到JDBI 2.x的最新版本-这将修复的不正确解析。
select * from profile where profile_id >= 1 and profile_id < 50