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

Inconsistencies in OData-CSDL section 14.2.2

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.01_OS
    • Fix Version/s: V4.01_ERRATA01
    • Component/s: CSDL JSON, CSDL XML
    • Labels:
      None
    • Proposal:
      Hide

      14.2.2 Target

      The target of an annotation is the model element the term is applied to.

      The target of an annotation MAY be specified indirectly by “nesting” the annotation within the model element. Whether and how this is possible is described per model element in this specification.

      The target of an annotation MAY also be specified directly; this allows defining an annotation in a different schema than the targeted model element.

      This external targeting is only possible for model elements that are uniquely identified within their parent, and all their ancestor elements are uniquely identified within their parent. These are the direct children of a schema with a unique name (i.e. except actions and functions whose overloads to not possess a natural identifier), and all direct children of an entity container.

      Model element Can be targeted with path expression (see also section 14.4.1.1) Example (from ex. 42)
      Action overload qualified name of action followed by parentheses containing the binding parameter type of a bound action overload to identify that bound overload, or by empty parentheses to identify the unbound overload  
      all overloads of an Action qualified name of action  
      Action Import qualified name of entity container followed by a segment containing the action import name  
      Annotation on a model element path expression identifying the model element followed by a segment containing an at (@) prepended to the qualified name of a term, optionally suffixed with a hash (#) and the qualifier of an annotation  
      Complex Type qualified name of complex type  
      Entity Container qualified name of entity container  
      Entity Set qualified name of entity container followed by a segment containing the entity set name  
      Entity Type qualified name of entity type  
      Enumeration Type qualified name of enumeration type  
      Enumeration Type Member qualified name of enumeration type followed by a segment containing the name of a child element  
      Function overload qualified name of function followed by parentheses containing the comma-separated list of the parameter types of a bound or unbound function overload in the order of their definition in the function overload  
      all overloads of a Function qualified name of function  
      Function Import qualified name of entity container followed by a segment containing the function import name  
      Navigation Property via container qualified name of entity container followed by a segment containing a singleton or entity set name and zero or more segments containing the name of a structural or navigation property, or a type-cast or term-cast  
      Navigation Property via structured type qualified name of structured type followed by zero or more segments containing the name of a structural or navigation property, or a type-cast or term-cast  
      Parameter qualified name of entity container followed by a segment containing an action or function import name followed by a segment containing a parameter name  
      Parameter qualified name of action or function optionally followed by a parenthesized expression as in the first row followed by a segment containing the name of a child element  
      Property via container qualified name of entity container followed by a segment containing a singleton or entity set name and zero or more segments containing the name of a structural or navigation property, or a type-cast or term-cast  
      Property via structured type qualified name of structured type followed by zero or more segments containing the name of a structural or navigation property, or a type-cast or term-cast  
      Return Type qualified name of entity container followed by a segment containing an action or function import name followed by a segment containing $ReturnType  
      Return Type qualified name of action or function optionally followed by a parenthesized expression as in the first row followed by a segment containing $ReturnType  
      Singleton qualified name of entity container followed by a segment containing a singleton name  
      Type Definition qualified name of type definition  

      All qualified names used in a target path MUST be in scope.

      External targeting of structural and navigation properties is possible "via container", i.e., for properties of singletons or entities in a particular entity set or in annotations thereof. These annotations targeted via container override annotations on the structural or navigation properties targeted via the declaring structured type.

      Show
      14.2.2 Target The target of an annotation is the model element the term is applied to. The target of an annotation MAY be specified indirectly by “nesting” the annotation within the model element. Whether and how this is possible is described per model element in this specification. The target of an annotation MAY also be specified directly; this allows defining an annotation in a different schema than the targeted model element. This external targeting is only possible for model elements that are uniquely identified within their parent, and all their ancestor elements are uniquely identified within their parent. These are the direct children of a schema with a unique name (i.e. except actions and functions whose overloads to not possess a natural identifier), and all direct children of an entity container. Model element Can be targeted with path expression (see also section 14.4.1.1) Example (from ex. 42) Action overload qualified name of action followed by parentheses containing the binding parameter type of a bound action overload to identify that bound overload, or by empty parentheses to identify the unbound overload   all overloads of an Action qualified name of action   Action Import qualified name of entity container followed by a segment containing the action import name   Annotation on a model element path expression identifying the model element followed by a segment containing an at (@) prepended to the qualified name of a term, optionally suffixed with a hash (#) and the qualifier of an annotation   Complex Type qualified name of complex type   Entity Container qualified name of entity container   Entity Set qualified name of entity container followed by a segment containing the entity set name   Entity Type qualified name of entity type   Enumeration Type qualified name of enumeration type   Enumeration Type Member qualified name of enumeration type followed by a segment containing the name of a child element   Function overload qualified name of function followed by parentheses containing the comma-separated list of the parameter types of a bound or unbound function overload in the order of their definition in the function overload   all overloads of a Function qualified name of function   Function Import qualified name of entity container followed by a segment containing the function import name   Navigation Property via container qualified name of entity container followed by a segment containing a singleton or entity set name and zero or more segments containing the name of a structural or navigation property, or a type-cast or term-cast   Navigation Property via structured type qualified name of structured type followed by zero or more segments containing the name of a structural or navigation property, or a type-cast or term-cast   Parameter qualified name of entity container followed by a segment containing an action or function import name followed by a segment containing a parameter name   Parameter qualified name of action or function optionally followed by a parenthesized expression as in the first row followed by a segment containing the name of a child element   Property  via container qualified name of entity container followed by a segment containing a singleton or entity set name and zero or more segments containing the name of a structural or navigation property, or a type-cast or term-cast   Property via structured type qualified name of structured type followed by zero or more segments containing the name of a structural or navigation property, or a type-cast or term-cast   Return Type qualified name of entity container followed by a segment containing an action or function import name followed by a segment containing  $ReturnType   Return Type qualified name of action or function optionally followed by a parenthesized expression as in the first row followed by a segment containing  $ReturnType   Singleton qualified name of entity container followed by a segment containing a singleton name   Type Definition qualified name of type definition   All  qualified names  used in a target path MUST be in scope. External targeting of structural and navigation properties is possible "via container", i.e., for properties of singletons or entities in a particular entity set  or in annotations thereof . These annotations targeted via container override annotations on the structural or navigation properties targeted via the declaring structured type.
    • Resolution:
      Show
      OData-CSDL-XML and OData-CSDL-JSON https://github.com/oasis-tcs/odata-specs/pull/57

      Description

      14.2.2 Target contains the following variant for a target path:

      qualified name of an entity container followed by a segment containing a singleton or entity set name and zero or more property, navigation property, or type-cast segments

      The necessary forward slashes are not mentioned.

        Attachments

          Activity

            People

            • Assignee:
              heiko.theissen Heiko Theissen
              Reporter:
              heiko.theissen Heiko Theissen
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: