Json/Query: allow backtracking into parent json entities
Open
area-json
- Dominant language
- C#
- Stars
- 14.8k
- Forks
- 3.4k
- PR merge metrics
- PR metrics pending
Description
When json has navigation to the parent entity, it's possible to build linq that would navigate back to the parent, e.g.
```
entity.Select(x => x.OwnedReference.OwnedNested.Parent.Name)
```
currently we throw as there is not much value in supporting this, but we could be smarter about it and "chop off" the unnecessary navs, so the query above would be equivalent to:
```
entity.Select(x => x.OwnedReference.Name)
```
Since we don't have query filters this should be fine. We should only pay attention to nullability (traversing to OwnedNested could render the entire chain nullable, if that navigation was nullable and OwnedReference was required
Contributor guide
Assessment
This issue has not been assessed yet.