Uploaded image for project: 'OASIS Open Data Protocol (OData) TC'
  1. OASIS Open Data Protocol (OData) TC
  2. ODATA-1547

Recursive complex types must be nullable

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.01_OS
    • Fix Version/s: V4.01_ERRATA01
    • Component/s: CSDL JSON, CSDL XML
    • Labels:
      None
    • Proposal:
      Hide

      Clarify that a recursive single-valued navigation and complex typed property must be nullable.  This rule is implied today, so calling it out to make it more apparent should not be a breaking change.

      Show
      Clarify that a recursive single-valued navigation and complex typed property must be nullable.  This rule is implied today, so calling it out to make it more apparent should not be a breaking change.
    • Resolution:
      Show
      https://github.com/oasis-tcs/odata-specs/pull/227

      Description

      We have rules around a partner navigation property in a recursive containment relationship (it must be single valued and nullable) but we don't call out the fact that the child of a single-valued recursive containment must also be nullable (or the recursion would never end). 

      Similarly, we say nothing about the child of a recursive complex-typed property. For example, we don't have a rule against the following definition, although the model it describes results in an endless recursion:

       

      <ComplexType Name="myType">
          <Property Name="nested" Type="myType" Nullable="false">
      </ComplexType> 

       

        Attachments

          Activity

            People

            • Assignee:
              handl Ralf Handl
              Reporter:
              mikep Michael Pizzo
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: