Composite collection of ValueCollectionDatasource

Is it possible we can load also the composite entities associated with ValueCollectionDatasource?

I have two entities PlanOrder and ProcessOrder, both of them have composite entities i.e. PlanOrderOperation and ProcessOrderOperation. I thave populated a GanttChart from PlanOrder entity (+planOrderProcess). Now I want to display data from both Plan order and process orders including their respective Composite entities. What is the recommended approach for this, is it a ValueCollectionDatasource?

Here is my valueCollectionDatasource looks like:
select e1.material.id, e1.material, e1.quantity, e1.id, ‘planorder’ as name from erp$PlanOrder e1 union
select e2.material.id, e2.material, e2.quantity, e2.id, ‘process order’ as name from erp$ProcessOrder e2

How can we get the composite entities of Plan Order and Process Orders?
Should I use Datasource class? If yes, could you please share a code snipped as I didn’t find documentation on this?
image

I have added a sample app in case you want to use it for testing. test-gantt.zip (102.9 KB)
Click on the refresh button in GanttChart screen to generate data.

Hi,

From your Data Model, I see that PlanOrder and ProcessOrder have similar attributes. The same for PlanOrderOperations and ProcessOrderOperations. In this case, you can create a parent entity for them and use this entity in the datasource to load data for both entities. Alternatively, if you don’t want to create a base entity, you can create a data provider for a chart and prepare data programmatically.

Regards,
Gleb

Thanks, I have implemented already which is the same to your option 1. I didn’t chose option 2 because i have implemented click listener to edit the data from on the go.

Mortoza