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

Custom method to fetch entities #217

Closed smiesnyrobert closed 1 year ago

smiesnyrobert commented 1 year ago

Hi, exists some way how to fetch jpa entities using my own repository with my own custom logic and then convert them to odata or pass them to processor?

eg. List<MyEntity> entities = myRepository.findByXXXX(); // this entities i want proccess to odata

Iam using spring boot, spring data

Thanks for help

wog48 commented 1 year ago

Currently there is no hook to implement the retrieval of a certain entity.

In general, your are able to use the metadata generation only and implement the retrieval of data on your own. You could also analyse the URI in the controller and direct, depending on the requested EntitySet, the request either to the JPA Processor or to an own implementation. To be honest, I haven't tried this.