0

In a JPQL query I compare a numeric constant to a bind parameter of type BigInteger (:param = 1). Is there any way to define that the constant type is a BigInteger in order to avoid IllegalArgumentException.

Ilias Stavrakis
  • 753
  • 10
  • 19
  • Could you please show your current code, including how you query the database with JPQL, and specify _exactly_ what problem you have? – Magnilex Apr 05 '16 at 06:45
  • 1
    as of jpa2.0 you cannot define TYPE in JPQL itself, but you should pass the same type as that you have used for variable param in Entity – Prasad Kharkar Apr 05 '16 at 06:49

1 Answers1

1

Try using this:

:param = java.math.BigInteger.ONE
Yaroslav
  • 118
  • 1
  • 8