-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Hi!
I tried to incorporate this to a project I'm working with but I can't seem to get it to work.
This works just fine (Without your filter)
CriteriaBuilder cb = entityManager.getCriteriaBuilder();
CriteriaQuery<Message> query = cb.createQuery(Message.class);
Root<Message> root = query.from(Message.class);
Join<Message, Event> join = root.join("events", JoinType.INNER);
query = query
.select(root)
.where(
cb.equal(join.get("eventType"), Event.EventType.SENT)
);
return entityManager.createQuery(query).getResultList();
However, trying to do the same with
selectFrom(messageRepository).innerJoin("events").where(filter).findAll();
and in-data
{ "field": "events.eventType", "operator": "eq", "value": "SENT" }
Results in the following error:
exception.GlobalControllerExceptionHandler - global controller exception handler encountered exception: SpecificationException message: Meet problem when parse field path: events.eventType, this path does not exist. Illegal attempt to dereference path source [null.events] of basic type
SpecificationException: Meet problem when parse field path: events.eventType, this path does not exist. Illegal attempt to dereference path source [null.events] of basic type
Caused by: java.lang.IllegalStateException: Illegal attempt to dereference path source [null.events] of basic type
crakdelpol
Metadata
Metadata
Assignees
Labels
No labels