Cast between enumeration types and integer types

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major
    • V4.01_CS02
    • Affects Version/s: V4.01_CS01
    • Component/s: URL Conventions
    • None
    • Environment:

      Applied

    • Hide

      Casting between enumeration types and integer types (of sufficient width) is possible based on the numeric value.

      This cast MUST be explicit, using the cast() function in URLs or the cast expression in CSDL.

      Call this out in URL Conventions, section 5.1.1.10.1 cast.

      Preferred wording: Services MAY support casting enumeration members to the underlying numeric values using the explicit cast function.

      Show
      Casting between enumeration types and integer types (of sufficient width) is possible based on the numeric value. This cast MUST be explicit, using the cast() function in URLs or the cast expression in CSDL. Call this out in URL Conventions, section 5.1.1.10.1  cast . Preferred wording: Services MAY support casting enumeration members to the underlying numeric values using the explicit cast function.
    • Show
      https://www.oasis-open.org/committees/download.php/64118/odata-v4.01-wd06-part2-url-conventions-2018-10-19.docx  

      Enumeration members have an explicit or (only in CSDL XML) implicit numeric value.

      Sorting and comparison of enumeration members is based in this numeric value.

      Unfortunately casting between enumeration types and integer types is not yet defined.

            Assignee:
            Michael Pizzo (Inactive)
            Reporter:
            handl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: