Filtering composite entities

Can a filter component be added to a child table in a composite relationship exists? In other words, Can I add a filter component to the Orders table on my Customer editor screen?

I am trying but I keep getting an error when I try to add a search condition.

java.lang.NullPointerException: query is null
	at com.haulmont.cuba.core.sys.jpql.QueryTreeAnalyzer.prepare(
	at com.haulmont.cuba.core.sys.jpql.QueryTreeAnalyzer.prepare(

I assigned the table to the filter attribute (applyTo) and the nested datasource to the filter attribute (datasource). I would just like confirmation if this is not possible before I spend any more time on it. Thanks.


i think it is not possible to use the filter component with nested datasources.

But it will work if you make your nested datasource a first level datasource with a where condition to met your outer datasource context (like "where e.customer = …).

Here’s actually an example in the docs that does exactly this:


Thanks. I appreciate it.