Skip to content

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.

develop
Switch branches/tags
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
jpa
 
 
 
 
 
 
 
 
 
 

Description

Build Status Coverage Status License REUSE status GitHub last commit (develop) GitHub pre-release REUSE status

The JPA Processor shall fill the gap between Olingo V4 and the database if JPA is used for object-relational mapping.

At the current state the JPA Processor provide support for:

  1. Generating OData metadata from JPA metadata.
  2. Processing Get requests by converting them into Criteria Builder queries.
  3. Supporting entity manipulations.

More details can be found in the Tutorials.

Requirements

The JPA Processor requires,minimum Java version 1.8. The current version comes with Olingo 4.8.0. If you want to be updated about Olingo changes subscribe to Olingos user mailing list.

Even so no JPA implementation is preferred, as long as it supports JSR-338 Java Persistence 2.1, it has to be stated that all test have been performed with Eclipselink 2.7.1. If you have any problem e.g. with Hibernate create an issue, but there is no guaranty that it can be solved, as Hibernate implements some JPA interfaces "differently" than EclipseLink.

Download and Installation

The JPA Processor is a collection of Maven projects. To use it you need to clone the repository, import the projects and declare a dependency to either the metadata generation only:

<dependency>
    <groupId>com.sap.olingo</groupId>
    <artifactId>odata-jpa-metadata</artifactId>
    <version>0.3.11-SNAPSHOT</version>
</dependency>

Or to the complete processor:

<dependency>
    <groupId>com.sap.olingo</groupId>
    <artifactId>odata-jpa-processor</artifactId>
    <version>0.3.11-SNAPSHOT</version>
</dependency>

Limitations

The project is still in the state of incubation, so some incompatible changes my come up, see To-Do. Nevertheless feel free to use the JPA processor where ever it helps.

How to obtain support

For bugs, questions and ideas for enhancement please open an issue in github.

To-Do (upcoming-changes)

The flowing extensions/changes are planned:

  • Transient fields
  • Enable hooks for retrieving data
  • Support of $ref
  • ETag on $metadata
  • Support asynchronous requests
  • Parallel processing for $expand
  • Enable server side paging at $expand
  • Overload Operations

License

Copyright (c) 2016-2021 SAP SE or an SAP affiliate company and olingo-jpa-processor-v4 contributors. Please see our LICENSE.txt for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available via the REUSE tool.

Release Notes

Version Changes Incompatible Changes
0.2.4 - Switch to Olingo version 4.4.0
- Support of Enumeration Types
- Support of $count at $expand
Yes
0.2.6 - Solution for issue #21
- JPA Join tables can be used e.g. for Many To Many relationship (issue #22). If such relation shall be used in a filter a corresponding JPA entity is required, which can be hidden from the API using @EdmIgnore. Please be aware that in case both source and target are subtypes Eclipselink (version 2.7.1 used) may get confused when generating a subquery for filtering, see Bug 529565
No
0.2.7 - Solution for issue #29
- Solution for issue #35
- Solution for issue #37
No
0.2.8 - Support of Collection Properties
- New tutorials 1.7 Suppressing Elements and 1.13 Collection Properties
No
0.2.9 - Support on top level server driven paging
- New tutorial 4.3 Server Driven Paging
No
0.2.10 - Handling of Content-Id in batch requests
- Update to Olingo 4.5.0
- Update tutorial 1.6, 3.3, 3.5 and 3.6
No
0.3.1 - Support of instance based authorizations
- Solution for issue #60
- Solution for issue #49
- Correct typo in interface JPAODataPagingProvider
- New tutorials 2.3, 4.4
Yes
0.3.2 - Lift unit tests to JUnit 5
- Correction of http return codes on empty responses
No
0.3.3 - Support of PUT requests on collection properties and simple primitive properties
- Update to Olingo 4.6.0
- Solution for issue #69
- Solution for issue #71
- Update tutorial 4.4
No
0.3.4 - Support of $select as part of $expand
- Support of field groups
- Introduction of a request context, which includes deprecation of methods
- Etag now written into response e.g. @odata.etag when JSON was requested
- Solution for issue #78
- Updated tutorials: 2.2, 2.3, 3.1, 3.2, 4.4
Yes
0.3.5 - Extension of session context, so an entity manager factory can be provided. This will allow creating Spring based services without persistence.xml file
- Solution for issue #85
- Usage of Olingo JSON deserializer for CUD requests
- Extension of session context, so an non Edm Name Builder can be provided
Yes
0.3.6 - Enable more flexible transaction handling
- Part solution for issue #83
- Increase support of Spring by performing request mapping in case a mapping path is provided via the service context
No
0.3.7 - Update Olingo dependency to 4.7.0 No
0.3.8 - Update Olingo dependency to 4.7.1
- Support of java.time data types. Prerequisite is the usage of JPA 2.2.
- Support of Absolute Context URL. See issue #103
- Temporal data types do not longer require a Precision #98
Support of MappedSuperclass
No
0.3.9 - Solutions for issue #112
- Solutions for issue #114
No
0.3.10 - Update Olingo dependency to 4.8.0
- Deprecation of setExternalName in IntermediateModelItemAccess
- Solutions for issue #134
- Solutions for issue #136
No
0.3.11 - - Solutions for issue #138 No

About

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.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages