JPA Filter @OneToMany (List)

Hello my Name ist Dennis and i run into an problem.
I have an Entity with the name planung thats holds an list and looks like

@OneToMany( targetEntity=Arbeitsschritt.class) private List<Arbeitsschritt> arbeitsschritte = new LinkedList<Arbeitsschritt>(); now i try to filter the data by list size,thats means i would see only planungs entity’s with an list size from zero.
I think it ist possible with an native JPQL query with the isEmpty, statment.
I tryed to code an own filter which implements Container.Filter, but than the framework raies an Filterconverter errror.

has anybody an nice tipp, hoq to solve my problem


So i found an solution, i guess thats a bit hacky. but it works!
i found the Querying with the Criteria API Articel in the Vaadin Doc:

For understanding:
planungen = JPAContainer with the Entity which holds an List-object
verbergeGeplante = Checkbox (if Valuechange planung is Rereshing)
arbeitsschritte = is the List property from the Entity

I recode it to

planungen.getEntityProvider().setQueryModifierDelegate(new DefaultQueryModifierDelegate() {
public void filtersWillBeAdded(CriteriaBuilder criteriaBuilder, CriteriaQuery<?> query,
List predicates) {

            if (verbergeGeplante.getValue()) {
                Root<?> fromPlanung = query.getRoots().iterator().next();
                Path<List<Arbeitsschritt>> arbeitsschritte = fromPlanung
                        .<List<Arbeitsschritt>> get("arbeitsschritte");