Search code examples
odataolingo

OData - $expand on navigation property of non navigation property


For example a simple structure:

 MyEntity
   - Property1 (identifier)
   - Property2 (Complex-Type)
      - Property3
      - NavigationProperty1
      - NavigationProperty2
   - NavigationProperty3
   - NavigationProperty4

I want to query /MyEntity(1)?$expand=Property2/NavigationProperty1 but our (Olingo) Server ignores the entire expand part of the URL and returns the MyEntity entity without the NavigationProperty1 property.

Should it be possible at all to expand a navigation property of a non navigation property?


Solution

  • As the OData Version 4.0 URL Conventions point out it should be possible to expand a navigation property of a complex type or an entity type.

    Screenshot page 37