You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Recursive types don't work for sap.ui.model.json.TypedJSONModel #532
We get errors:
Which does make sense, of course, but it makes this model unusable for types generated for OData Entities, because they can be indeed recursive.
The example above demonstrates that. So, we have an Order, which can have OrderItem[], and OrderItem may have Order. It goes into recursive and kills the types.
Expected behavior
There should be a possibility to use types, even if they are recursive.
I actually had developed typed JSONModel by myself couple of years ago, and I solved this issue by adding Depth, which sets the max number of inner properties to be accessible.
Let's say we have /Orders/0/to_OrderItems/results as in example above. The depth here would be 4. / -> Depth 0 /Orders -> Depth 1 /Orders/0 -> Depth 2
etc.
So I would propose to have that in the TypedJSONModel.
If there are better ideas - would be nice hear them out.
Activity