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.

License

Notifications You must be signed in to change notification settings

dbhandari555/olingo-jpa-processor-v4

 
 

Repository files navigation

Description

Build Status Coverage License REUSE status GitHub last commit (develop) GitHub release Project Map

The JPA Processor shall fill the gap between Olingo V4 and the database, if JPA is used for object-relational mapping. If you want to be updated about Olingo changes subscribe to Olingo's user mailing list.

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.

To get started make use of the Quicks Start tutorial.

The tutorials from the previous major version is still available under: Tutorials.

Requirements

As of now, the JPA Processor has two major versions 1.1.x and 2.x.x.

1.1.x

The JPA Processor requires, minimum Java version 1.8. The current version comes with Olingo 4.9.0.

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

There is no further development for this major version.

2.x.x

The current version is based on Jakarta 10, so JPA 3.1.0 or Jakarta Persistence Specification, receptively and Jakarta Servlet 6.0. Test are performed using Eclipselink 4.0.2, but there is no real dependency to a JPA implementation. This version requires Java 17.

The current version comes with Olingo 5.0.0.

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>2.1.1</version>
</dependency>

Or to the complete processor:

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

Limitations

The core of this project became stable. Some of the addons are still in the state of incubation, so some incompatible changes my come up. Nevertheless feel free to use the JPA processor and the addons where ever it helps.

Contributing

If you want to report a bug or have suggestions to improve the JPA Processor, read up on our guidelines for contributing to learn about our submission process, coding rules and more.

We'd love all and any contributions.

To-Do (upcoming-changes)

The following extensions/changes are planned:

  • Support of method call at $orderby
  • Tenant depended metadata
  • Enable hooks for retrieving data
  • Support of $ref
  • ETag on $metadata
  • Support asynchronous requests
  • Parallel processing for $expand

New versions will follow Semantic Versioning.

License

Copyright (c) 2016-2023 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
1.0.6 - Transient Properties
- Singletons
- Entity Types without Entity Set
- Rework Request Context
- Deprecation of annotation EdmAsEntitySet
Yes
1.0.8 - Solution for issue #145 No
1.0.9 - Update Olingo dependency to 4.9.0
- Solutions for issues #164, #155, #191, #156
No
1.1.1 - Enable action overload
- Basic support of OData annotations
- Solution of issues #207, #211, #212, #213, #214,#218
No
2.0.0 - Minimum Java release now 17
- Switch to Jakarta Persistence
- Support of Spring Boot 3.x
- JPAEdmMetadataPostProcessor became an interface
Yes
2.0.2 - Solution for issue #239
- Partial solution for issue #226
- Solution for issue #238 and #236
No
2.1.0 - Enhancement of annotation API
- Enhancement of API for server driven paging
- Optional support of IN operand
- Update to Olingo 5.0.0
- Rework $count implementation
- Fix problem with $count on collection properties
No
2.1.1 - Fix for issue [#292] (SAP#292) 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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%