Jens Huesken created OLINGO-476:
-----------------------------------
Summary: 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
Priority: Critical
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.
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)