[
https://issues.apache.org/jira/browse/OLINGO-476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Bolz resolved OLINGO-476.
---------------------------------
Resolution: Fixed
Fix Version/s: V2 2.0.3
Solution 1) was implemented and merged with [this
commit|https://git-wip-us.apache.org/repos/asf?p=olingo-odata2.git;a=commit;h=5bb61bf2c9ae753958e18e0e51b1f8b33ec38ad4]
> Enum Data Types
> ---------------
>
> Key: OLINGO-476
> URL: https://issues.apache.org/jira/browse/OLINGO-476
> Project: Olingo
> Issue Type: New Feature
> Components: odata2-annotation, odata2-jpa
> Affects Versions: V2 2.0.0
> Reporter: Jens Huesken
> Assignee: Chandan V.A
> Priority: Critical
> Fix For: V2 2.0.3
>
>
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)