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

Should we allow arrays of primitive in term definitions?

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.01_CS01
    • Fix Version/s: V4.01_CS02
    • Component/s: CSDL JSON, CSDL XML
    • Labels:
      None

      Description

      When we introduced the Edm.Primitive type, we explicitly disallowed defining properties of type Collection(Edm.Primitive) because we had no way to annotate individual primitive values within a JSON array.

      We did not define the same restriction for term definitions; as a result, it's possible to define a term as a Collection(Edm.Primitive). This hasn't been a problem for terms applied in XML CSDL because the XML CSDL has a way to specify the type of a primitive value within a Collection. However, with ODATA-1221 we now use the same primitive representation in JSON CSDL as in JSON data payloads, which means we no longer have a way to annotate individual primitive values within a collection in JSON CSDL.

      Note that we also have the issue with instance annotations – we cannot apply a term in an instance annotation that is defined as a collection of Edm.Primitive without relying on hueristics for determining between string, bool, or double.

      It seems that failing to restrict term definitions was an oversight, and our intention was likely to restrict any uses of collection(edm.primitive) in our data (and metadata) model.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mikep Michael Pizzo (Inactive)
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: