-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: V4.01_OS
-
Fix Version/s: V4.01_ERRATA01
-
Labels:
-
Proposal:
ODATA-1498 clarifies that "A collection of primitive values that occurs in a property of type Edm.Untyped is interpreted as a collection of Edm.Boolean, Edm.String, and Edm.Decimal, depending on the JavaScript type."
This rule is true because we can't specify the type of a primitive value within a collection. However, the wording is misleading, because:
1) It's a bit ambiguous what "occurs in a property of type Edm.Untyped" references – is that to say, that the property is an untyped collection of primitives, or is an untyped collection that contains a collection of untyped primitives, or...?
2) It doesn't mention Collection(Edm.Untyped)
3) It implies that the collection is a collection of one of the javascript types, as opposed to an individual value within any untyped collection being interpreted as one of these types. i.e., the collection itself is untyped, and can contain primitives of any of these three types.
Better wording would be something like "A primitive value within an untyped collection is interpreted as a Edm.Boolean, Edm.String, or Edm.Decimal."
In addition, we should note that a collection nested within a collection will always be an untyped collection; this is because there is no place to put a type annotation for the collection, and we say that, once you enter the untyped world, you remain untyped unless type information is explicitly supplied.