1

I am using skife to help with my database queries. I have the query and method below.

@SqlQuery("select * from profile where profile_id >= :from and profile_id < :to")
List<Profile> findAllInRange(@Bind("from")int from, @Bind("to")int to);

I get the following error

org.postgresql.util.PSQLException: ERROR: argument of AND must be type boolean, not type bigint

But if I execute this query

select * from profile where profile_id >= 1 and profile_id < 50

my RDBMS returns the results successfully.

What am I missing?

Szymon Stepniak
  • 40,216
  • 10
  • 104
  • 131
MaxPower
  • 881
  • 1
  • 8
  • 25

1 Answers1

1

Credit to MinMiguelM

I needed to place \\ before the < operator

MaxPower
  • 881
  • 1
  • 8
  • 25