I want to cast column from string to long to use the cb.between()
functionality.
cb.between(number.as(Long.class), Long.valueOf(startNumber), Long.valueOf(endNumber));
number is Path<String>
Getting an exception as expecting CLOSE, found '(' near line 1, column 967...[query]
At char 967 of the query, its '(' in numeric(19,0)
within query, it is not forming query using bigint, instead numeric.
In junit its working properly where in query bigint is generated in it.
I have also gone through below, please let me know how to solve the problem.
Using JPA 2.0 Criteria API and cast causes generated JPQL to fail in Hibernate
Best Regards, Soheb Shaikh