using JPA 2.1 and hibernate 5.1.x, this is possible with JPQL
select s.lowerBound,
l.status
...
from Serie s
left join Line l on
s.lowerBound between l.lineStart and l.lineEnd
how do i write this using Criteria api? i attempted this
Root<Serie> serieRoot = query.from(Serie.class);
Root<Line> lineRoot query.from(Line.class);
query.where(criteriaBuilder.between(s.get("lowerBound"), l.get("lineStart"), s.get("lineEnd")))
but this doesn't allow me to specify it's a left join.