SAP / olingo-jpa-processor-v4

The JPA Processor fills the gap between Olingo V4 and the database, by providing a mapping between JPA metadata and OData metadata, generating queries and supporting the entity manipulations.
Apache License 2.0
122 stars 78 forks source link

@EdmAlias does not work #240

Open DimitarTanev87 opened 10 months ago

DimitarTanev87 commented 10 months ago

I added @EdmAlias annotation with name = "RandomName" on a field in my entity class: ... @EdmAlias(name = "RandomName") @Column(name = "type", nullable = false) private String type; ...

but the response still contains Type: ... Property Name="Type" Type="Edm.String" Nullable="false" MaxLength="255"/ ...

wog48 commented 10 months ago

Actually it turned out that the annotation had not been implemented. What is the use case you would need the annotation for?

DimitarTanev87 commented 10 months ago

To change the property name, to be something different than "type" when execute ".../$metadata".

wog48 commented 10 months ago

Currently the only way to achieve this is to implement an own Name Builder. Doing so, you can override each property name. Let me know if this helps.