on 04-26-2023 4:29 PM
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.
As mentioned in the documentation, it is not possible to express all types of filters as ranges:
and
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.