Fixed
Details
Assignee
Brett MeyerBrett MeyerReporter
Kristof NeirynckKristof NeirynckLabels
Components
Fix versions
Affects versions
Priority
Major
Details
Details
Assignee
Brett Meyer
Brett MeyerReporter
Kristof Neirynck
Kristof NeirynckLabels
Components
Fix versions
Affects versions
Priority
Created August 22, 2014 at 4:59 PM
Updated January 13, 2016 at 6:27 PM
Resolved January 10, 2016 at 3:15 AM
In this example I would expect both NINE and ELEVEN to be converted with the DollarsToCentsConverter.
Only ELEVEN is.
This problem doesn't ocur when using jpql.
Also doesn't occur when using
cb.and(cb.ge(...), cb.le(...))
.@Test public void testCriteriaBetween9And11Is10() { System.out.println("*** testCriteriaBetween9And11Is10 ***"); CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaQuery<Amount> cq = cb.createQuery(Amount.class); Root<Amount> root = cq.from(Amount.class); List<Amount> resultListBetweenLowAndHighWithCB = em.createQuery(cq .select(root) .where(cb.between(root.get(Amount_.dollars), NINE, ELEVEN))) .getResultList(); assertThat(resultListBetweenLowAndHighWithCB.size(), is(1)); }