Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nullable Collection Navigation Property #290

Open
ralfhandl opened this issue Mar 20, 2024 · 1 comment
Open

Nullable Collection Navigation Property #290

ralfhandl opened this issue Mar 20, 2024 · 1 comment

Comments

@ralfhandl
Copy link
Contributor

There is the assertion:
"Nullable MUST NOT be specified for a collection-valued navigation property, a collection is allowed to have zero items."

A property, regardless of multiplicity consumes a slot in an instance (entity representation). The slot has a sequence of values, depending on cardinality. If the slot has no values, then the property is said to be null. If an entry in a list of values has no value, then that entry is null. So, you can both have a collection property that is null or a collection property consisting of a list of null values. After much discussion, the DMTF specified the following for the values of a collection property (i.e. upper bound on multiplicity > 1)

  • NULL: The collection has no specified value.
  • [] : The collection has no elements (I.e. size = 0
  • [ Null ] : The collection has one element specified as having no value
  • [ "" ] : The collection has one element specified as having the empty string
  • [ "x", Null, "y",...] : The collection has multiple elements, some may be specified as having no value.

The collection representing the list of values is not a separate modeled entity, rather it is a representation of the value list of the property itself.

Proposal

Explain the possible variations as described above. Then remove the prohibition against specifying NULL on a navigation property collection. It should be treated like any other property.

Imported from ODATA-1071

@ralfhandl
Copy link
Contributor Author

May be related to #376

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Open
Development

No branches or pull requests

2 participants