View Single Post
  #1 (permalink)  
Old January 12th, 2016, 06:36 AM
tzervos tzervos is offline
Registered User
Points: 11, Level: 1
Points: 11, Level: 1 Points: 11, Level: 1 Points: 11, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2016
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Criterion won't compile

Hi,
I'm trying to use the Criterion class from ch23 and the compiler is complaining about a few statements like this:
Code:
return b.lessThan(r.<Comparable> get(c.getPropertyName()), getComparable(c));
with the error:
"The method lessThan(Expression<? extends Y>, Expression<? extends Y>) in the type CriteriaBuilder is not applicable for the arguments (Path<Comparable>, Comparable<capture#4-of ?>)".

It looks like the getComparable(Criterion c) method is not valid with latest JPA API (I'm using 2.1:1.0.0.Final), but I'm not certain yet - still investigating.

Any ideas?


Thanks,
Tasos
Reply With Quote