Expand: Depth greater than 3

Query data with depth >3.

I have a table that I query with "$expand". Querying up to depth 3 works fine. When I query a 4th level, it is empty.
If I start with the table directly in the first sublevel, the (now) 3rd level (formerly the 4th level) is also read out correctly.
I make the queries to test with Postman.

Here's an example:

does not work. The addresses are empty.

is OK. But gives the same results as above.

also works completely correctly.

I have the impression that everything works until level 3 (depth 3). From level 4 onwards there is no more data.

All default values we found are set to 0.
We also tested
TXDataServer properties set to 6
(DefaultExpandLevel, ProxyLoadDepth, ProxyListLoadDepth)
In the Postman header "xdata-expand-level: 6" makes no change.

We have debugged the source and the difference from level 3 to level 4 is that when writing the data, the ProxyController in level 4 is nil. But in level 3 (same type) there is the Object.

What have we missed?

Below are 2 graphics showing the result.
The names and the entities are different. It's about "PersonAddressList"
If level 3 then it will be displayed.
If level 4 then it is empty.


Hi Thomas,

There is indeed a limit otherwise this can get really bad. The default limit is 3. But you can extend it using Aurelius TGlobalConfig.MaxEagerFetchDepth property:



  TGlobalConfigs.GetInstance.MaxEagerFetchDepth := 5;

It works.
For testing purposes, we changed the default value in the Aurelius Unit directly. That hadn't worked. Either it wasn't compiled correctly or there are default values in other places.
But that's how it works.

Thank you

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.