cancel
Showing results for 
Search instead for 
Did you mean: 

CDS Custom Entity not working with Multilevel Expand

catalinfeidi
Participant

Hi there,

We have been experimenting CDS Custom Entity in order to keep the legacy code clean but we do have a corner case to load full BO which custom entity is not supporting.

We need to retrieve parent entity -> children entity -> grandchildren entity, all together as follows:

Parent(entity: parent)

-Child1(entity:_children)

--GrandChild1forChild1(entity: _grandchildren)

--GrandChild2forChild2(entity: _grandchildren)

Child2(entity:_children)

--GrandChild1forChild2(entity: _grandchildren)

--GrandChild2forChild2(entity: _grandchildren)

Our OData call:

/parent?$filter=((key1 eq 'something1')and(key2 eq 'something2'))&$expand=_child($expand=_grandchildren)

When we want to get the navigation keys inside of _grandchildren query implementation class as doing get_filter()->get_as_ranges(), it is short-dumping when method is being called, because there are 2 children for the Parent(Child1 and Child2). It doesn't work with multiple parents for that respective entity.


This seems to be a limitation of Custom Entity, not supporting the expand of associations on entities that have more entries.

View Entire Topic
dominik_ee
Advisor
Advisor