Uploaded image for project: 'Olingo'
  1. Olingo
  2. OLINGO-476

Enum Data Types

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • V2 2.0.0
    • V2 2.0.3
    • None

    Description

      The annotation @Enumerated is not supported yet in the Olingo JPA Processor.

      Example:

      @Column(name="TYPE", nullable=true)
      @Enumerated(EnumType.STRING)
      protected AddressType type = null;

      Now, when trying to access the OData endpoint the following error occurs:

      "OData - JPA Type Converter: Type [class xyz.model.AddressType] not supported”

      This issue might also be a topic for the annotation processor (see OLINGO-477).

      Options for an implementation:

      1) Just translate the Enumerated property as an OData property with type as either EDM String or Integer. Now it is up to consumers of this service to pass the correct set of values (by referring documentation) during write operations to this property.
      2) In addition to adding the property we can create an additional OData entity for the enumeration and link this entity with those entities that refer to this enumeration.

      Attachments

        Issue Links

          Activity

            People

              chandan.v.a Chandan V.A
              jens.huesken Jens Huesken
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: