Using ValueCollectionDatasourceImpl from two tables

Hi, I want to use left join jpql for ValueCollectionDatasource.
Here the query I use:

select o.propertyA, o.propertyB, t.entityThree.propertyC, t.entityThree.propertyD 
from app$EntityOne o 
left join app$EntityTwo t
where o.propertyA = t.propertyA

But what happened is that it throws this error:


I was looking here the error was about view and attributes. I know how to set up the views for CollectionDatasource, but how about the ValueCollectionDatasource? Or is the error of something else?

Hi Yosi,

Could you provide a sample application with the error?

I tried to reproduce the error. NPE is thrown then propertyA doesn’t exist on app$EntityTwo. We’ll correct error message for this case.

Hmm… It’s bit hard to provide the sample application. But the property in the queries are all exists.
It’s just by default, CUBA doesn’t allow you to read a property that’s associated with another entity without specifying the view.

So. What’s the workaround?