CSDL ReturnType element needs to specify rules for Nullable and Collection with entity types

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major
    • V4.01_CS02
    • Affects Version/s: V4.01_CS01
    • Component/s: CSDL JSON, CSDL XML
    • None
    • Environment:

      Applied

      It is reasonable to assume:

      • A collection of entities never contains null because the “null entity” has no meaning.
      • A function returning a single entity would have to return 204 No Content to signal “no entity returned”, similar to following a single-valued navigation property with nothing associated at that point in time.

      Therefore:

      • A function returning entities behaves like a navigation property.
      • A function returning structured or primitive instances behaves like a structural property.

      In regard to CSDL XML/JSON 4.01, we should specify:

      Nullable should never be specified for a Collection(SomeEntityType), and it must always be considered to be false by default. This would bring consistency with navigation properties.

      Going one step further, we should probably apply this reasoning to Parameter elements, i.e. a parameter of type Collection(SomeEntityType) should also never have an explicit Nullable facet.

            Assignee:
            Unassigned
            Reporter:
            evan.ireland.2
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: