I am new to JPA
I am trying to query a table where my input date value should be between the startDate and endDate of the database record
I am trying to do:<
Something like this should work...
List conditionsList = new ArrayList();
Predicate onStart = criteriaBuilder.greaterThanOrEqualTo(root.get("startDate"), inputDate);
Predicate onEnd = criteriaBuilder.lessThanOrEqualTo(root.get("endDate"), inputDate);
conditionsList.add(onStart);
conditionsList.add(onEnd);
criteriaQuery.select(root).where(conditionsList.toArray(new Predicate[]{}));