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

Allow nulls in a Collection of Entities #1983

Open
Hubert-Heijkers opened this issue Sep 3, 2024 · 1 comment
Open

Allow nulls in a Collection of Entities #1983

Hubert-Heijkers opened this issue Sep 3, 2024 · 1 comment

Comments

@Hubert-Heijkers
Copy link

Hubert-Heijkers commented Sep 3, 2024

First up, at least for now (ordered collections might change my opinion on this one later;-), not trying to change the fact that a collection valued navigation property should not be nullable and therefore should not contain any nulls.

This topic is specifically for the Return Type where we specifically specify that "If the return type is a collection of entity types, the $Nullable member has no meaning and MUST NOT be specified.". For Parameters on the other hand we do not specify that limitation (albeit I don't have a case where I'd want to pass in nulls in a collection of entities).

My proposal would be to strike that limitation for Return Type referenced above, remove that sentence and remove the word 'other' from the sentence that follows, bringing it in line with the definition for Parameter.

FYI this came up as part of the discussion of #290 but by itself is unrelated as I'm not seeking to change what's allowed for a, collection valued, navigation property at this point in time.

@ralfhandl
Copy link
Contributor

ralfhandl commented Sep 4, 2024

  1. $count is the number of items in the collection, not the number of unique entities
  2. entity sets and navigation properties cannot have duplicates or null values
  3. be careful regarding the different defaults for Nullable and $Nullable in the two CSDL dialects

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

No branches or pull requests

2 participants