I'm using jinq version 1.8.11 with hibernate version 4.3 Using hibernate session factory and not entity manager.
I'm trying the following query:
JPAJinqStream<Routine> routineStream = stream.streamAll(getCurrentSession(), Routine.class);
if (text.isPresent()) {
final String searchText = text.get();
routineStream = routineStream
.leftOuterJoin(
(r, source) -> source.stream(NLSProperty.class),
(r, nls) -> nls.getVarKey().equals("routine.100.title")
).select(pair -> pair.getOne());"%" + searchText + "%")).select(Pair::getOne);
}
List<Routine> tp = routineStream.toList();
When the variable text is not present the query works and I get results. When the variable text is present I'm getting the following error:
java.lang.IllegalStateException: DOT node with no left-hand-side!
any ideas what am I doing wrong?
I have debug the jinq and the query it's generating looks like this:
SELECT A FROM de.etherapists.ehealth.model.routine.Routine A LEFT OUTER JOIN de.etherapists.ehealth.model.NLSProperty B ON B.varKey = 'routine.100.title';
Thanks