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 77 forks source link

Use JPA's @Transient ist not visible in OData metadata #75

Closed samakovuluk closed 5 years ago

samakovuluk commented 5 years ago

Just created my first JPA entity together with Olingo + JPA Processor. I want to use an entity property with the @Transient annotation so the database is not populated with that value. Unfortunately, that property is not visible in the $metadata of the service. Is there any way to create a visible property that is transient for JPA?

NutterzUK commented 2 months ago

Did you find a solution to this?

wog48 commented 2 months ago

In 1.0.0 a new annotation was introduced: EdmTransient. This is needed to ensure that all data are provided to calculate the value of the transient property and to know the calculator. So, a field has to be marked with @Transient and @EdmTransient. You can use Person#fullName as an example. At the current state, it is neither possible to filter on such properties nor to use them in orderby. Therefore you may want to think about calculating the property on the database and base the entity on view rather than on the table.

NutterzUK commented 2 months ago

Thanks @wog48 ! That’s fantastic.

Is there a list anywhere of low hanging fruit for new contributors to go after? I’d like to help out.