Skip to content

Commit

Permalink
Release/update 2.x.x (#419)
Browse files Browse the repository at this point in the history
* Update version to 2.2.0-SNAPSHOT (#302)

* Bump flyway.version from 10.11.0 to 10.11.1 in /jpa (#295)

Bumps `flyway.version` from 10.11.0 to 10.11.1.

Updates `org.flywaydb:flyway-core` from 10.11.0 to 10.11.1
- [Release notes](https://github.com/flyway/flyway/releases)
- [Commits](https://github.com/flyway/flyway/compare/flyway-10.11.0...flyway-10.11.1)

Updates `org.flywaydb:flyway-database-hsqldb` from 10.11.0 to 10.11.1

---
updated-dependencies:
- dependency-name: org.flywaydb:flyway-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.flywaydb:flyway-database-hsqldb
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump org.slf4j:slf4j-api from 2.0.9 to 2.0.13 in /jpa (#296)

Bumps org.slf4j:slf4j-api from 2.0.9 to 2.0.13.

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Oliver Grande <[email protected]>

* Bump org.sonarsource.scanner.maven:sonar-maven-plugin in /jpa (#297)

Bumps [org.sonarsource.scanner.maven:sonar-maven-plugin](https://github.com/SonarSource/sonar-scanner-maven) from 3.10.0.2594 to 3.11.0.3922.
- [Release notes](https://github.com/SonarSource/sonar-scanner-maven/releases)
- [Commits](https://github.com/SonarSource/sonar-scanner-maven/compare/3.10.0.2594...3.11.0.3922)

---
updated-dependencies:
- dependency-name: org.sonarsource.scanner.maven:sonar-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Oliver Grande <[email protected]>

* Bump org.jacoco:jacoco-maven-plugin from 0.8.11 to 0.8.12 in /jpa (#298)

Bumps [org.jacoco:jacoco-maven-plugin](https://github.com/jacoco/jacoco) from 0.8.11 to 0.8.12.
- [Release notes](https://github.com/jacoco/jacoco/releases)
- [Commits](https://github.com/jacoco/jacoco/compare/v0.8.11...v0.8.12)

---
updated-dependencies:
- dependency-name: org.jacoco:jacoco-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Oliver Grande <[email protected]>

* Bump com.fasterxml.jackson:jackson-bom from 2.16.0 to 2.17.1 in /jpa (#304)

Bumps [com.fasterxml.jackson:jackson-bom](https://github.com/FasterXML/jackson-bom) from 2.16.0 to 2.17.1.
- [Commits](https://github.com/FasterXML/jackson-bom/compare/jackson-bom-2.16.0...jackson-bom-2.17.1)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson:jackson-bom
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Oliver Grande <[email protected]>

* Fix issue 292

* Update version to 2.1.2 (#317)

* Bump org.slf4j:slf4j-simple from 2.0.9 to 2.0.13 in /jpa (#312)

Bumps org.slf4j:slf4j-simple from 2.0.9 to 2.0.13.

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-simple
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump org.pitest:pitest-maven from 1.15.3 to 1.16.1 in /jpa (#310)

Bumps [org.pitest:pitest-maven](https://github.com/hcoles/pitest) from 1.15.3 to 1.16.1.
- [Release notes](https://github.com/hcoles/pitest/releases)
- [Commits](https://github.com/hcoles/pitest/compare/1.15.3...1.16.1)

---
updated-dependencies:
- dependency-name: org.pitest:pitest-maven
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Oliver Grande <[email protected]>

* Bump org.mockito:mockito-core from 5.11.0 to 5.12.0 in /jpa (#313)

Bumps [org.mockito:mockito-core](https://github.com/mockito/mockito) from 5.11.0 to 5.12.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.11.0...v5.12.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Oliver Grande <[email protected]>

* Bump flyway.version from 10.11.1 to 10.13.0 in /jpa (#315)

Bumps `flyway.version` from 10.11.1 to 10.13.0.

Updates `org.flywaydb:flyway-core` from 10.11.1 to 10.13.0
- [Release notes](https://github.com/flyway/flyway/releases)
- [Commits](https://github.com/flyway/flyway/compare/flyway-10.11.1...flyway-10.13.0)

Updates `org.flywaydb:flyway-database-hsqldb` from 10.11.1 to 10.13.0

---
updated-dependencies:
- dependency-name: org.flywaydb:flyway-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.flywaydb:flyway-database-hsqldb
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Oliver Grande <[email protected]>

* Bump org.springframework:spring-jcl from 6.1.4 to 6.1.8 in /jpa (#320)

Bumps [org.springframework:spring-jcl](https://github.com/spring-projects/spring-framework) from 6.1.4 to 6.1.8.
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.1.4...v6.1.8)

---
updated-dependencies:
- dependency-name: org.springframework:spring-jcl
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Oliver Grande <[email protected]>

* Bump org.sonarsource.scanner.maven:sonar-maven-plugin in /jpa (#328)

Bumps [org.sonarsource.scanner.maven:sonar-maven-plugin](https://github.com/SonarSource/sonar-scanner-maven) from 3.11.0.3922 to 4.0.0.4121.
- [Release notes](https://github.com/SonarSource/sonar-scanner-maven/releases)
- [Commits](https://github.com/SonarSource/sonar-scanner-maven/compare/3.11.0.3922...4.0.0.4121)

---
updated-dependencies:
- dependency-name: org.sonarsource.scanner.maven:sonar-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump org.eclipse.persistence:org.eclipse.persistence.jpa in /jpa (#321)

Bumps [org.eclipse.persistence:org.eclipse.persistence.jpa](https://github.com/eclipse-ee4j/eclipselink) from 4.0.2 to 4.0.3.
- [Release notes](https://github.com/eclipse-ee4j/eclipselink/releases)
- [Commits](https://github.com/eclipse-ee4j/eclipselink/compare/4.0.2...4.0.3)

---
updated-dependencies:
- dependency-name: org.eclipse.persistence:org.eclipse.persistence.jpa
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump com.tngtech.archunit:archunit-junit5 from 1.2.1 to 1.3.0 in /jpa (#323)

Bumps [com.tngtech.archunit:archunit-junit5](https://github.com/TNG/ArchUnit) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/TNG/ArchUnit/releases)
- [Commits](https://github.com/TNG/ArchUnit/compare/v1.2.1...v1.3.0)

---
updated-dependencies:
- dependency-name: com.tngtech.archunit:archunit-junit5
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump io.netty:netty-codec-http in /jpa (#332)

Bumps [io.netty:netty-codec-http](https://github.com/netty/netty) from 4.1.108.Final to 4.1.111.Final.
- [Commits](https://github.com/netty/netty/compare/netty-4.1.108.Final...netty-4.1.111.Final)

---
updated-dependencies:
- dependency-name: io.netty:netty-codec-http
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Oliver Grande <[email protected]>

* Bump flyway.version from 10.13.0 to 10.15.0 in /jpa (#333)

Bumps `flyway.version` from 10.13.0 to 10.15.0.

Updates `org.flywaydb:flyway-core` from 10.13.0 to 10.15.0
- [Release notes](https://github.com/flyway/flyway/releases)
- [Commits](https://github.com/flyway/flyway/compare/flyway-10.13.0...flyway-10.15.0)

Updates `org.flywaydb:flyway-database-hsqldb` from 10.13.0 to 10.15.0

---
updated-dependencies:
- dependency-name: org.flywaydb:flyway-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.flywaydb:flyway-database-hsqldb
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Oliver Grande <[email protected]>

* Bugfix #325 - Add support for filtering by lambda operator on collections when navigation is one of the resource parts  (#329)

* add support for filtering by lambda operator on collections when navigation property is one of resource parts

* Adding additional test case to make sure no regression

* Bump up the version

* add support for filtering by lambda operator on collections when navigation property is one of resource parts

* Adding additional test case to make sure no regression

* Bump up the version

* Update the archetype version

---------

Co-authored-by: Oliver Grande <[email protected]>

* Bump jakarta.servlet:jakarta.servlet-api from 6.0.0 to 6.1.0 in /jpa (#335)

Bumps [jakarta.servlet:jakarta.servlet-api](https://github.com/eclipse-ee4j/servlet-api) from 6.0.0 to 6.1.0.
- [Commits](https://github.com/eclipse-ee4j/servlet-api/commits)

---
updated-dependencies:
- dependency-name: jakarta.servlet:jakarta.servlet-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump org.springframework:spring-jcl from 6.1.8 to 6.1.10 in /jpa (#336)

Bumps [org.springframework:spring-jcl](https://github.com/spring-projects/spring-framework) from 6.1.8 to 6.1.10.
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.1.8...v6.1.10)

---
updated-dependencies:
- dependency-name: org.springframework:spring-jcl
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump org.hsqldb:hsqldb from 2.7.2 to 2.7.3 in /jpa (#337)

Bumps org.hsqldb:hsqldb from 2.7.2 to 2.7.3.

---
updated-dependencies:
- dependency-name: org.hsqldb:hsqldb
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Oliver Grande <[email protected]>

* Bump org.apache.maven.plugins:maven-surefire-plugin in /jpa (#338)

Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.2.5 to 3.3.0.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.2.5...surefire-3.3.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Oliver Grande <[email protected]>

* Defect/version 2.1.3 (#339)

* Feature/transient fields (#142)

* Fix null pointer if no enumerations are part of servcie

* Enable HAS and enumeration as return type of operations

* Allow Enumerations as operation parameter

* Provide java based operations converted enumeration

* Add SourceClear addon

* Delete SourceClean addon

* Enumerations at UDF functions

- Works for bound functions
- Works for functions with import

* Correct unit tests

* Enable multiple values for flags enumerations

* Switch detection default between Embedded and Entity type

* Allow collection attributes for metadata

* Enable query without collection attributes

* Rework query result conversion to reduce memory consumtion

* Missing Metadata pom

* First step entity with collections as return of function/action

* Bugfix: Expand on Parent with $filter on navigation path

* Enable the use of Join Tables

- Filter on navigation via Join Table generally not supported

* Create new query for inlinecount

* Enable Join Tables@Navigation Filter

- Not working mapped associations
- Not working $count

* Enable Join Tables@Navigation Filter

- With mapped associations
- With $count, know issue EclipsLink two sub types

* Increase Version --> 0.2.6

* Remove deprecated JPAExecutableQuery

* Bugfix: unidirectional join table based association

* Access collection properties via navigation

- New version

* Access collection properties w and w/o $select

* Access collection properties which are part of complex property

* CUD operations on collection properties

* Filter on collection properties pre optimization

* Filter on collection properties any/all

* Filter on collection w/o filter on $count and orderby $count

* Correct issue #29

- Correct /$count implementation in JPAJoinQuery
- Clean-up Hibernate differences
-- Subquery from clause
-- Id Class determination

* Increase Version to 0.2.7

* Enable [email protected] in case of odata.metadata=full

- links@complex types not yet working

* Preparation for solution of issue OLINGO-1143

* Correct NullPointer and some clean-ups

* Support order by $count

- Increase version to 0.2.8

* Intermediate merge clean-up

* Solve merge problem navigate complex collections

* Resolve merge conflict converter

* Correct error collection property and expand=*

* Enable filter $count on collection property

* Update version and url

* Create and use page provider

* Recreate change for solution of issue OLINGO-1143

* Finalize top level server driven paging

* Correct string handling error

* Correct link problem

* Enable skiptoken to have other type than String

* Move paging so next request injects old uriInfo correctly

* Enable deep insert via complex properties

* Ignore test for next commit

* Enable create of a new entity linked by a to one using PATCH

* Update to Olingo 4.5.0

- use new Olingo version
- adopt one test to changed @odata.context content

* Collection attributes rework. Issue #60

- Change processor pom  -> javax.servlet became provided

* Enable annotation for properties to mark them authorization relevant

* Enable multiple protected properties at complex attributes

* Rework EdmProtectedBy annotation to handle multiple claims at complex

* Process protection

* Rework handling of ignored protected

* Made inner class static

* Fixing issue #60

* $count query not working correctly on complex collection attributes

* Various small bugs

- Reorg.  pom.xml
- Correct http status on empty result
- Correct empty check for collection properties

* Correct typo in interface JPAODataPagingProvider

* Prepare JPAODataDatabaseTableFunction for paging

* Change to HSQLDB

* Remove function from sql-file to work around problems with Derby

* Correct NullPointerException EdmEntitySetResult

* Determine result of create dependent based on before image

* EntityType getAttribute did not return value for embedded id

* Provide CUD example and correct query status codes

* Correct query response

* Maven Archetype for Spring based service

* Upgrade to Junit5 to get support for Java > 1.8

* Extract interface for better unit test support

- Cleanup tests

* Clean-up interface implementation

* Add SQL function handling

* Complete DB function changes

* Clean-up test class

* Clean-up test class

* Update Version number

* Update Version number

* Additional test for API classes

* Enable suppress of wildcard in metadata

* Enable wildcards during query processing

* Increase information on error during filter

* Support of PUT on collection properties and primitive properties

* Fix Null Pointer on PATCH with return != minimal

* Claims where not respected by queries issue #69 part one

- /$count
- ?$count=true
- paging queries

* Claims where not respected by queries issue #69 part two

- $filter
- Update on Olingo 4.6.0

* Restrict the DISTINCT to protections only

* Increase test coverage

- New tests
- Rework vocabulary handling

* Cleanup Vocabularies II

- Add Action and Function
- Remove NavigationProperty and dependent

* Additional test and solution of issue #78

* Enable new annotation EdmVisibleFor at properties

* Introduction of Request Context

- Deprecation of two variants of JPAODataGetHandler.process
- Increase test coverage

* Restrict EdmVisiableFor to nullable non key attributes

* Skip properties from selection that do not belong to provided group

* Handle collection properties and navigation path

* Enable groups at complex collections

* Handle OrderBy clause

* Correct unit test

* Rework test containing images

* Rework context handling

- Move of cud handler to request context
- Move of DebugSupport to request context (is request specific because
of isUserAuthorized)
- Introduction of builder for Service Context to get a leaner creation
of handler

* Providing groups during modifying requests

* Re-enable old shortcut with late metadata provisioning

* Update pom for missing jackson dependency

* Update Archetype to version 0.3.4

* Update Version

* Extension of session context, so an emf can be provided

* Ignore annotation qualified if empty

* Go back to Olingo JSON deserializer

* Add qualifier to annotation

* Increase release

* Clean-up JPAEdmNameBuilder

* Preparation of custom name builder

- Create public interface
- replace class by new interface

* Revoke test adoption

* Providing custome name builder

* Update annotation EdmFunction

* Increase release

* Adopt archetype

- Simplify service
- Add integration test

* Modify example did not persist on create

* Deep Insert did not responded deep

* Always select ETag

* Complete ETag handling

* Missing Context Changes

* Reset unit test to current pushed state

* Increase test coverage

* Adopt test to real number of complex types

* Enable V4.01 JSON format as request and response

* Additional Integration tests support OData V4.01 JSON

* Allow usage of different types of transaction

* Increase Spring support

* Bugfix/issue83 (#120)

* Update Version

* Extension of session context, so an emf can be provided

* Preparation of custom name builder

- Create public interface
- replace class by new interface

* Revoke test adoption

* Providing custome name builder

* Update annotation EdmFunction

* Increase release

* Adopt archetype

- Simplify service
- Add integration test

* Modify example did not persist on create

* Deep Insert did not responded deep

* Always select ETag

* Complete ETag handling

* Missing Context Changes

* Reset unit test to current pushed state

* Increase test coverage

* Adopt test to real number of complex types

* Enable V4.01 JSON format as request and response

* Additional Integration tests support OData V4.01 JSON

* Allow usage of different types of transaction

* Increase Spring support

* Restrict $expand select by key range

* Support root with navigation like AdministrativeDivision(...)/Children

* Protect dilution of test coverage by test package (#133)

* Increase release

* Increase release (#136)

* Protect dilution of test coverage by test package (#135)

* Remove deprecated artifacts (#134)

* Remove deprecated artefacts

* Missing test adoptions

* Upgrade Olingo version and processor version

* Feature/transient fields (#137)

* Increase release

* Upgrade Olingo version and processor version

* Prevent NPE on expand empty result (#138)

* Correct SonarQube and SpotBug hints

* Feature/transient fields (#139)

* Increase release

* Upgrade Olingo version and processor version

* Correct SonarQube and SpotBug hints

* SpotBugs and clean-ups

* Build metadata I

* First draft of criteria builder and query implementation (#140)

* First draft of criteria builder and query implementation

* Add Transient

* First join version

* Correct structured type

* Test adoption was missing

* Update criteria builder

* Solve enum error

* Support aggregation function

* Correct buildInverseJoinColumns() error

* Add Test buildInverseJoinColumns() error

* Enable table join without entity type

* Correct Error table name

* Own test for JPAEdmProvider and correct name builder error

* Additional test

* Support parallel processing of batch requests

* Complete synchronized creation of metadata

* Enable transient field calculator

* Suppress transient fields at $filter and $orderby

* Enable transient collections and collections with transient attributes

* Additional tests for changing operations

* Enable absolute path in url

* Add sonar plugin (#144)

* Add sonar plugin

* Update pom with sonar plugin

* Feature/logging (#145)

* Add sonar plugin

* Update pom with sonar plugin

* Remove old xmake version

* Feature/logging (#147)

* Add sonar plugin

* Update pom with sonar plugin

* Remove old xmake version

* Logging as part of standard debugger

* Generic authorization check for JPAExampleCUDRequestHandler

* Feature/logging (#148)

* Add sonar plugin

* Update pom with sonar plugin

* Remove old xmake version

* Logging as part of standard debugger

* Generic authorization check for JPAExampleCUDRequestHandler

* Update xmake version

* Feature/logging (#150)

* Add sonar plugin

* Update pom with sonar plugin

* Remove old xmake version

* Logging as part of standard debugger

* Generic authorization check for JPAExampleCUDRequestHandler

* Update xmake version

* Clean-up sonar issues

* Feature/logging (#151)

* Add sonar plugin

* Update pom with sonar plugin

* Remove old xmake version

* Logging as part of standard debugger

* Generic authorization check for JPAExampleCUDRequestHandler

* Update xmake version

* Clean-up sonar issues

* Update build status on read.me

* New badges

* Update README.md

* Update README.md

* Feature/logging (#152)

* Add sonar plugin

* Update pom with sonar plugin

* Remove old xmake version

* Logging as part of standard debugger

* Generic authorization check for JPAExampleCUDRequestHandler

* Update xmake version

* Clean-up sonar issues

* Update build status on read.me

* New badges

* Clean-up sonar issues

* Create additional test for debugger

* Add tests for debugger

* Update README.md

* Replace database derby -> hsqldb

* Update README.md (#153)

* Feature/logging (#154)

* Add sonar plugin

* Update pom with sonar plugin

* Remove old xmake version

* Logging as part of standard debugger

* Generic authorization check for JPAExampleCUDRequestHandler

* Update xmake version

* Clean-up sonar issues

* Update build status on read.me

* New badges

* Clean-up sonar issues

* Create additional test for debugger

* Add tests for debugger

* Update README.md

* Replace database derby -> hsqldb

* Cleanup sonar issue

* Increase test coverage for criteria builder (#155)

* Feature/criteria builder (#156)

* Increase test coverage for criteria builder

* Replace double implementation by mocks

* Update README.md (#157)

* Feature/criteria builder (#158)

* Increase test coverage for criteria builder

* Replace double implementation by mocks

* Rework vocabulary read

* Feature/criteria builder (#159)

* Increase test coverage for criteria builder

* Replace double implementation by mocks

* Rework vocabulary read

* Add method to retrieve all claims

* Update README.md (#160)

* Update README.md

* Update README.md

* Remove potential null pointer (#161)

* Bugfix/sonar issues (#162)

* Remove potential null pointer

* Remove potential Null Pointer

* Bugfix/sonar issues (#163)

* Remove potential null pointer

* Remove potential Null Pointer

* Remove potential Null Pointer

* Bugfix/sonar issues (#164)

* Remove potential null pointer

* Remove potential Null Pointer

* Remove potential Null Pointer

* Additional clean-ups

* Work on soanr issues

* Bugfix/sonar issues (#165)

* Remove potential null pointer

* Remove potential Null Pointer

* Remove potential Null Pointer

* Additional clean-ups

* Work on soanr issues

* Additional cleanups

* Feature/release 1.0.0 (#170)

* Bugfix/typo package (#168)

* Update version to 1.0.0-RC

* Rename package to ...metadata.core.edm.mapper.extension

* Rename message constants

* Correct typos in method names

* Rollback change to Optional

* Support Include Annotation (#169)

* Feature/include annotation (#171)

* Support Include Annotation

* Increase test coverage transient properties

* Bugfix/issue98 (#173)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Bugfix/issue98 (#174)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Clean-up sonar issue

* Clean-up sonar

* Clean-up author

* Meaningfull error message on $apply

* Service Context creates Emf Wrapper if present in class path

* Suppoprt of MappedSuperclass

* $top and $skip use order by primary key

* sonar issues (#175)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Clean-up sonar issue

* Clean-up sonar

* Clean-up author

* Meaningfull error message on $apply

* Service Context creates Emf Wrapper if present in class path

* Suppoprt of MappedSuperclass

* $top and $skip use order by primary key

* Clean-up sonar issues

* Bugfix/issue98 (#176)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Clean-up sonar issue

* Clean-up sonar

* Clean-up author

* Meaningfull error message on $apply

* Service Context creates Emf Wrapper if present in class path

* Suppoprt of MappedSuperclass

* $top and $skip use order by primary key

* Clean-up sonar issues

* Clean-up sonar issues

* Bugfix/issue98 (#177)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Clean-up sonar issue

* Clean-up sonar

* Clean-up author

* Meaningfull error message on $apply

* Service Context creates Emf Wrapper if present in class path

* Suppoprt of MappedSuperclass

* $top and $skip use order by primary key

* Clean-up sonar issues

* Clean-up sonar issues

* Delete intermediate code

* Feature/criteria builder (#178)

* Increase test coverage for criteria builder

* Replace double implementation by mocks

* Rework vocabulary read

* Add method to retrieve all claims

* Add README.md and correct spelling errors

* Add README.md and correct spelling errors (#179)

* Feature/release 1.0.0 (#192)

* Bugfix/typo package (#168)

* Update version to 1.0.0-RC

* Rename package to ...metadata.core.edm.mapper.extension

* Rename message constants

* Correct typos in method names

* Rollback change to Optional

* Support Include Annotation (#169)

* Feature/include annotation (#171)

* Support Include Annotation

* Increase test coverage transient properties

* Bugfix/syntax errors (#181)

* Feature/release 1.0.0 (#170)

* Bugfix/typo package (#168)

* Update version to 1.0.0-RC

* Rename package to ...metadata.core.edm.mapper.extension

* Rename message constants

* Correct typos in method names

* Rollback change to Optional

* Support Include Annotation (#169)

* Feature/include annotation (#171)

* Support Include Annotation

* Increase test coverage transient properties

* Bugfix/issue98 (#173)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Bugfix/issue98 (#174)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Clean-up sonar issue

* Clean-up sonar

* Clean-up author

* Meaningfull error message on $apply

* Service Context creates Emf Wrapper if present in class path

* Suppoprt of MappedSuperclass

* $top and $skip use order by primary key

* sonar issues (#175)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Clean-up sonar issue

* Clean-up sonar

* Clean-up author

* Meaningfull error message on $apply

* Service Context creates Emf Wrapper if present in class path

* Suppoprt of MappedSuperclass

* $top and $skip use order by primary key

* Clean-up sonar issues

* Bugfix/issue98 (#176)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Clean-up sonar issue

* Clean-up sonar

* Clean-up author

* Meaningfull error message on $apply

* Service Context creates Emf Wrapper if present in class path

* Suppoprt of MappedSuperclass

* $top and $skip use order by primary key

* Clean-up sonar issues

* Clean-up sonar issues

* Bugfix/issue98 (#177)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Clean-up sonar issue

* Clean-up sonar

* Clean-up author

* Meaningfull error message on $apply

* Service Context creates Emf Wrapper if present in class path

* Suppoprt of MappedSuperclass

* $top and $skip use order by primary key

* Clean-up sonar issues

* Clean-up sonar issues

* Delete intermediate code

* Feature/criteria builder (#178)

* Increase test coverage for criteria builder

* Replace double implementation by mocks

* Rework vocabulary read

* Add method to retrieve all claims

* Add README.md and correct spelling errors

* Add README.md and correct spelling errors

* Correct syntax errors metadata

* Clean-up typos

* Rework build of OrderBy creation (#183)

* Bugfix/syntax errors (#185)

* Feature/release 1.0.0 (#170)

* Bugfix/typo package (#168)

* Update version to 1.0.0-RC

* Rename package to ...metadata.core.edm.mapper.extension

* Rename message constants

* Correct typos in method names

* Rollback change to Optional

* Support Include Annotation (#169)

* Feature/include annotation (#171)

* Support Include Annotation

* Increase test coverage transient properties

* Bugfix/issue98 (#173)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Bugfix/issue98 (#174)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Clean-up sonar issue

* Clean-up sonar

* Clean-up author

* Meaningfull error message on $apply

* Service Context creates Emf Wrapper if present in class path

* Suppoprt of MappedSuperclass

* $top and $skip use order by primary key

* sonar issues (#175)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Clean-up sonar issue

* Clean-up sonar

* Clean-up author

* Meaningfull error message on $apply

* Service Context creates Emf Wrapper if present in class path

* Suppoprt of MappedSuperclass

* $top and $skip use order by primary key

* Clean-up sonar issues

* Bugfix/issue98 (#176)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Clean-up sonar issue

* Clean-up sonar

* Clean-up author

* Meaningfull error message on $apply

* Service Context creates Emf Wrapper if present in class path

* Suppoprt of MappedSuperclass

* $top and $skip use order by primary key

* Clean-up sonar issues

* Clean-up sonar issues

* Bugfix/issue98 (#177)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Clean-up sonar issue

* Clean-up sonar

* Clean-up author

* Meaningfull error message on $apply

* Service Context creates Emf Wrapper if present in class path

* Suppoprt of MappedSuperclass

* $top and $skip use order by primary key

* Clean-up sonar issues

* Clean-up sonar issues

* Delete intermediate code

* Feature/criteria builder (#178)

* Increase test coverage for criteria builder

* Replace double implementation by mocks

* Rework vocabulary read

* Add method to retrieve all claims

* Add README.md and correct spelling errors

* Add README.md and correct spelling errors

* Add README.md and correct spelling errors (#179)

* Correct syntax errors metadata

* Clean-up typos

* Update Version -> 1.0.0

* Usage of builder to create external request context (#187)

* Bugfix/continue on error (#189)

* Move batch processor from API to PROCESSOR package

* Correct continue-on-error handling

* Support generated Id in example CUD handler (#190)

* Support generated Id in example CUD handler

* Correct failing test

* Adoption of archetype to 1.0.0 (#191)

* Adoption of archetype to 1.0.0

* Correct sql error

* Clean-up sonar issues

* Correct criteria builder implementation (#193)

* Feature/criteria builder (#194)

* Correct criteria builder implementation

* Enable sub query as FROM

* Update tests

* Update sonar issues

* Update sonar issue

* Add mutation testing to processor and metadata

* Feature/criteria builder (#195)

* Correct criteria builder implementation

* Enable sub query as FROM

* Update tests

* Update sonar issues

* Update sonar issue

* Add mutation testing to processor and metadata

* Eliminate duplicate code

* Feature/criteria builder (#196)

* Correct criteria builder implementation

* Enable sub query as FROM

* Update tests

* Update sonar issues

* Update sonar issue

* Add mutation testing to processor and metadata

* Eliminate duplicate code

* Add Locale to request context, so it can be set from user data

* Correct request context copy

* Feature/criteria builder (#197)

* Correct criteria builder implementation

* Enable sub query as FROM

* Update tests

* Update sonar issues

* Update sonar issue

* Add mutation testing to processor and metadata

* Eliminate duplicate code

* Add Locale to request context, so it can be set from user data

* Correct request context copy

* Missing transient fields at $expand

* Add tests

* Feature/criteria builder (#198)

* Correct criteria builder implementation

* Enable sub query as FROM

* Update tests

* Update sonar issues

* Update sonar issue

* Add mutation testing to processor and metadata

* Eliminate duplicate code

* Add Locale to request context, so it can be set from user data

* Correct request context copy

* Missing transient fields at $expand

* Add tests

* Fix GeneratedKey problem

* Feature/criteria builder (#199)

* Correct criteria builder implementation

* Enable sub query as FROM

* Update tests

* Update sonar issues

* Update sonar issue

* Add mutation testing to processor and metadata

* Eliminate duplicate code

* Add Locale to request context, so it can be set from user data

* Correct request context copy

* Missing transient fields at $expand

* Add tests

* Fix GeneratedKey problem

* Intermediate state

* Enable next block of queries

* Expand with Join Tables

* Last unit test corrections

* Eliminate typos

* Finalize changes

* missing variable usage (#200)

* missing variable usage

* Increase processor version

* Clean-up Sonar issues (#201)

* Bugfix/no mapper for operations (#202)

* Clean-up Sonar issues

* Add test for type mapping for actions and java function

+ Cleanup test classes

* Feature/1.0.1 (#203)

* Correct criteria builder implementation

* Enable sub query as FROM

* Update tests

* Update sonar issues

* Update sonar issue

* Add mutation testing to processor and metadata

* Eliminate duplicate code

* Add Locale to request context, so it can be set from user data

* Correct request context copy

* Missing transient fields at $expand

* Add tests

* Fix GeneratedKey problem

* Change version to 1.0.1

* New version (#204)

* Bugfix/filter eq withdate (#205)

* New version

* Support filter on Date and DateTime

* Correct precision

* Change another test

* Us generated alias for column selection (#206)

* Upgrade Version (#207)

* Us generated alias for column selection

* Upgrade version

* Reduce complexity (#209)

* ALL did not work with functions like startswith (#210)

* Update version (#208)

* Entity Set Path @ DB Functions (#211)

* Feature/new archetype (#212)

* Clean-up folder name

* Create archetype repo

* Use copy of spring archetype as start

* Enable named queries

* Feature/new archetype (#213)

* Clean-up folder name

* Create archetype repo

* Use copy of spring archetype as start

* Enable named queries

* Allow Star for non string claim properties

* Add Equals method to DeepProtectedExample

* Feature/new archetype (#214)

* Clean-up folder name

* Create archetype repo

* Use copy of spring archetype as start

* Enable named queries

* Allow Star for non string claim properties

* Add Equals method to DeepProtectedExample

* Enable grant access to all for non string fields read

* Replace Reflections API by Reflections8 (#215)

* Support entitytypes singeltons (#216)

* New annotation to make singletons and entity types

- Update to olingo 4.8.0
- Deprecate EdmAsEntitySet
- Read not ready

* Update README.md (#218)

* Update README.md

* Update README.md

* Update README.md

* Solve issue 136 (#217)

* Solve issue 136

* Eliminate hyphen

* Eliminate WhiteSource detected vulnerabilities (#219)

* Eliminate WhiteSource detected vulnerabilities

* Add now required dependency

* Remove setExternalName from Metadata Post Processor (#220)

* Support entitytypes singeltons (#221)

* New annotation to make singletons and entity types

- Update to olingo 4.8.0
- Deprecate EdmAsEntitySet

* Wrong entity type on singleton only

* Add java doc to TopLevelElementRepresentation

* Finalize singleton metadata handling

* Clean-up test classes

* Add option to retrieve Singleton from SD

* Rename test class

* Support entitytypes singeltons (#222)

* New annotation to make singletons and entity types

- Update to olingo 4.8.0
- Deprecate EdmAsEntitySet

* Wrong entity type on singleton only

* Add java doc to TopLevelElementRepresentation

* Finalize singleton metadata handling

* Clean-up test classes

* Add option to retrieve Singleton from SD

* Rename test class

* Add and clean-up unit tests

* Query extension declaration (#223)

* New annotation to make singletons and entity types

- Update to olingo 4.8.0
- Deprecate EdmAsEntitySet

* Wrong entity type on singleton only

* Add java doc to TopLevelElementRepresentation

* Finalize singleton metadata handling

* Clean-up test classes

* Add option to retrieve Singleton from SD

* Rename test class

* Add and clean-up unit tests

* Introduce query extension metadata

* Enable Singleton and Cast on subtypes

- clean-up sonar issues

* Support entity types and singletons (#224)

* New annotation to make singletons and entity types

- Update to olingo 4.8.0
- Deprecate EdmAsEntitySet

* Wrong entity type on singleton only

* Add java doc to TopLevelElementRepresentation

* Finalize singleton metadata handling

* Clean-up test classes

* Add option to retrieve Singleton from SD

* Rename test class

* Add and clean-up unit tests

* Introduce query extension metadata

* Enable Singleton and Cast on subtypes

- clean-up sonar issues

* Clean-up sonar issues

* Support cast on navigations (#225)

* New annotation to make singletons and entity types

- Update to olingo 4.8.0
- Deprecate EdmAsEntitySet

* Wrong entity type on singleton only

* Add java doc to TopLevelElementRepresentation

* Finalize singleton metadata handling

* Clean-up test classes

* Add option to retrieve Singleton from SD

* Rename test class

* Add and clean-up unit tests

* Introduce query extension metadata

* Enable Singleton and Cast on subtypes

- clean-up sonar issues

* Clean-up sonar issues

* Cast within navigation path

* Add cast collections

* Add tests for EdmBoundCast

* Support Cast on $expand

* Update README.md (#226)

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Bugfix/no constranis with ignored properties (#227)

* Suppress referential constraint for properties that shall be ignored

* No Referential Constraint in case one property shall be ignored

* Bugfix/no constranis with ignored properties (#228)

* Suppress referential constraint for properties that shall be ignored

* No Referential Constraint in case one property shall be ignored

* Bring back error on ignored

* Enable subtyping for complex types (#229)

* Support transient properties that require ignored properties (#231)

* Bugfix/multi level inheritance (#232)

* Adopt process-cb

* Correct type converter problem

* Use dbType for tuple result mapping

* Bugfix/multi level inheritance (#233)

* Adopt process-cb

* Correct type converter problem

* Use dbType for tuple result mapping

* Correct constructor test of extension

* Feature/release 1.0.3 (#234)

* Correct typos and replace deprecated method

* Set final Version

* Feature/release 1.0.4 (#235)

* Error corrections

- Debugger did not work
- Transaction Factory not forwarded

* Update release

* Make debugger runtime a List

* Feature/release 1.0.4 (#236)

* Error corrections

- Debugger did not work
- Transaction Factory not forwarded

* Update release

* Make debugger runtime a List

* Small adoptions to test model

* Reset change

* Error correction (#237)

* Feature/release 1.0.5 (#238)

* Error corrections

- Debugger did not work
- Transaction Factory not forwarded

* Update release

* Make debugger runtime a List

* Small adoptions to test model

* Reset change

* Add test for criteria builder

* Error correction

* Update H2 version (#239)

* Update H2 version

* Update version and rework DataSourceHelper

* Feature/release 1.0.6 (#240)

* Update H2 version

* Update version and rework DataSourceHelper

* Let H2 run in Postges mode

* Upgrade version and additional tests (#241)

* Upgrade version and additional tests

* Remove session context from queries

* Remove session context from processors

* New version an sonar clean-up (#242)

* Release 1.1.0 (#243)

* New version an sonar clean-up

* New path property fro sonar

* Release 1.1.0 (#244)

* New version an sonar clean-up

* New path property fro sonar

* Test usage of SNAPSHOT version

* Update version -> 1.0.8 (#245)

* Update version -> 1.0.8

* Count queries support Integer as result

* Update archetype to support PATCH

* Feature/release 1.0.0 (#247)

* New version an sonar clean-up

* New path property fro sonar

* Test usage of SNAPSHOT version

* Adopt archetype

* Clean-up sonar issues

* Resolve more sonar issues

* Introducing virtual property

* Clean-up associations and enable default columns when using ...-cb

* Generate metadata for overloaded action (#248)

* Generate metadata for overloaded action

* Process action

* Feature/action overload (#249)

* Generate metadata for overloaded action

* Process action

* Use constructor of entity type an action is called for not of binding

* Fix claims in collections where (#250)

* Fix claims in collections where

* Missed interface definition

* Missed test renaming

* Use dbtype to build key pair in case a conversion exists (#251)

* Enable more constructors for binding parameter (#252)

* Feature/more flexable constructor determination operations (#253)

* Enable more constructors for binding parameter

* Clean-up sonar errors

* New type cast added - they have possible data lost (#254)

* Collection not longer retrieves transient (#255)

* Collection not longer retrieves transient

* Skip unit test

* Enhance partner determination (#256)

* Bugfix/reuse navigation as partner (#257)

* Enhance partner determination

* Remove one sonar issue

* Bugfix/reuse navigation as partner (#258)

* Enhance partner determination

* Remove one sonar issue

* Correct partner determination

* No fallback to server locale in case bundle requested local not found (#259)

* Replace file reader (#260)

* Replace fixed values by variables (#261)

* Bugfix/error in controller test (#262)

* Replace fixed values by variables

* Update pom

* Update archetype pom (#265)

* Defect/archetype pom (#266)

* Update archetype pom

* Check older version of sonar plugin

* Update test constants (#267)

* Correct count behavior (#268)

* Change to Java 11 (#269)

* Change to Java 11

* Revert Java 11

* Update README.md (#270)

* Defect/count not working on hana (#271)

* Correct count behavior

* Ignore sonar check. Equal methods are generated

* Defect/java function parameter name (#272)

* Raise meaningful exception on empty function parameter name

* Meaningful exception if action parameter name empty

* Raise message in case of Void as return type for functions (#273)

* Raise message in case of Void as return type for functions

* Add extenstion

* Error in if clause

* Extension of visitor for java functions (#274)

* Update version to 1.1.1 (#275)

* Feature/predefined annotations (#276)

* First list of predefined OData annotations

* Update capabilities annotations

* Sonar issues

* Update dependencies

* Adopt layer test

* Add page to order by builder (#277)

* Feature/predefined annotations (#278)

* First list of predefined OData annotations

* Update capabilities annotations

* Sonar issues

* Update dependencies

* Adopt layer test

* Intermediate state

* Clean-up basic mapping and introduce annotation

* Finalize annotation mapper

* Feature/predefined annotations (#279)

* First list of predefined OData annotations

* Update capabilities annotations

* Sonar issues

* Update dependencies

* Adopt layer test

* Intermediate state

* Clean-up basic mapping and introduce annotation

* Finalize annotation mapper

* Update dependency

* Feature/predefined annotations (#280)

* First list of predefined OData annotations

* Update capabilities annotations

* Sonar issues

* Update dependencies

* Adopt layer test

* Intermediate state

* Clean-up basic mapping and introduce annotation

* Finalize annotation mapper

* Update dependency

* Adopt HSQLDB

* Update .xmake.cfg (#283)

* Update .xmake.cfg

* Update .xmake.cfg

* Correct spelling (#281)

* Feature/predefined annotations (#282)

* First list of predefined OData annotations

* Update capabilities annotations

* Sonar issues

* Update dependencies

* Adopt layer test

* Intermediate state

* Clean-up basic mapping and introduce annotation

* Finalize annotation mapper

* Update dependency

* Adopt HSQLDB

* Rename package for vocabulary parser

* Move OData vocabularies to new module

* Merge tests

* Annotations in metadata

* Finalize annotations within metadata

* Update .xmake.cfg (#284)

* Update .xmake.cfg

* Update .xmake.cfg

* Feature/predefined annotations (#286)

* First list of predefined OData annotations

* Update capabilities annotations

* Sonar issues

* Update dependencies

* Adopt layer test

* Intermediate state

* Clean-up basic mapping and introduce annotation

* Finalize annotation mapper

* Update dependency

* Adopt HSQLDB

* Rename package for vocabulary parser

* Move OData vocabularies to new module

* Merge tests

* Annotations in metadata

* Finalize annotations within metadata

* Support sorting restrictions by annotation

* Build annotation based expand check

* Expand star via path reads only requested from database

* Check countability

* Support collection property count

* Annotations@Singeltons

* Provide AnnotationProvider to all model elements

* Enable annotations at properties

* Feature/predefined annotations (#287)

* First list of predefined OData annotations

* Update capabilities annotations

* Sonar issues

* Update dependencies

* Adopt layer test

* Intermediate state

* Clean-up basic mapping and introduce annotation

* Finalize annotation mapper

* Update dependency

* Adopt HSQLDB

* Rename package for vocabulary parser

* Move OData vocabularies to new module

* Merge tests

* Annotations in metadata

* Finalize annotations within metadata

* Support sorting restrictions by annotation

* Build annotation based expand check

* Expand star via path reads only requested from database

* Check countability

* Support collection property count

* Annotations@Singeltons

* Provide AnnotationProvider to all model elements

* Enable annotations at properties

* Enable access to annotations via JPARequestEntity

* Watch filtering

* Clean-up pom and typo correction (#288)

* Solve issue 212 and fix permission check issue with join tables (#289)

* Solve issue 212 and fix permission check issue with join tables

* $count for collection join as well

* Clean-up code

* Fix issue, converting type (#290)

* Fix issue, converting type

* Fix unit test

* Correct type determination

* Multi step Mapped Superclass (#291)

* Upgrade H2 to 2.2.220 (#293)

* Correct navigation to one is null (#294)

* Fix join column determination with cyclic dependency (#295)

* Fix join column determination with cyclic dependency

* Additional test for navigation with mapped join table

* Make OneToOne required and handle non JPA Processor errors in metadata (#296)

* Defect/issue214 (#297)

* Make OneToOne required and handle non JPA Processor errors in metadata

* Clean-up warnings

* Defect/issue214 (#298)

* Make OneToOne required and handle non JPA Processor errors in metadata

* Clean-up warnings

* Add check for OneToMany

* Clean-up sonar issues

* Update .xmake.cfg (#300)

* Update version to 2.0.0 (#299)

* Update version to 2.0.0

* Unify junit version

* Make use of Jakarta

* Clean-up sonar issues created by switching to Java 17

* Update dependencies

* Update dependencies and clean-up typos

* Add unit tests

* Increase test coverage

* Defect/issue226 (#301)

* Update version

* Adopt correction done for release

* Clean-up archetype

* Clean-up error

* Add test to check Olingo not supporting $expand...($level=; $expand...)

* Note thrown runtime exception

* First level of COUNT query as IN (#302)

* Defect/issues239 (#303)

* First level of COUNT query as IN

* Deletion of JPACollectionFilterQuery

* Defect/issues239 (#304)

* First level of COUNT query as IN

* Deletion of JPACollectionFilterQuery

* Handle null where conditions

* Rename properties file to prevent name clashes (#305)

* Rename properties file to prevent name clashes

* Update dependency, resolve conflict with Olingo

* Clean-up pom and some code (#306)

* Defect/pom cleanup (#307)

* Clean-up pom and some code

* Update dependencies

* Archetype and SOnar clean-up (#308)

* Add protection where to collection query (#309)

* Check if cast is necessary (#310)

* Set version to 2.0.2 (#311)

* Update to Olingo 5.0.0 and remove wrapper (#314)

* Extend interface for server driven paging (#313)

* Extend interface for server driven paging

* Correct failing tests

* Clean-ups

* Sonar clean-up

* Change default implementation

* Enhance paging provider interface

* Finalize paging provider

* Feature/enhancement of paging (#315)

* Extend interface for server driven paging

* Correct failing tests

* Clean-ups

* Sonar clean-up

* Change default implementation

* Enhance paging provider interface

* Finalize paging provider

* Use synchronized instead of thread save collections

* First version and some clean-ups (#312)

* First version and some clean-ups

* Update filter restriction and new query directives

* New query implementation for count (#316)

* Feature/annotation api extension (#317)

* First step

* Enhancement with path expressions

* Re-factor annotation search

* Get annotation value from property

* Prepare test of EntityType and NavigationProperty

* Finalize annotation API

* Update project files (#318)

* Add null check for NOT IN clauses (#319)

* Fix $count problem with collection properties (#320)

* Fix $count problem with collection properties

* Handle navigation filter query for collection properties

* Defect/use raw uri for vocabularies (#321)

* Update urls

* update pom

* Defect/use raw uri for vocabularies (#322)

* Update urls

* update pom

* Defect/missing paging expand with cp (#323)

* Introduction of default paging provider

* Skip token shall be null

* Handle LIMIT and OFFSET with TypedQuery (#324)

* Defect/eclipse link hana problem (#325)

* Handle LIMIT and OFFSET with TypedQuery

* Update default for LIMIT

* Check restrictions on IN clause (#326)

* Correct NPE if enum property is nullable (#327)

* Update README.md (#328)

* Update README.md

* Update README.md

* Fix duplicates result multi expands issue#292 (#329)

* Defect/enumeration convertion error (#330)

* Update Version

* Make use of @Enumerated and fix order issue

* Update version to 2.1.2

* Suppress generation of defaults for LIMIT and OFFSET (#331)

* Enable order by to one associations (#333)

* Enhanced ETag handling for GET entity set requests (#332)

* Enhanced ETag handling for GET entity set requests

* Prepare ETag handling for functions and actions

* Cleanup test for filter using db functions

* Fix unit tests

* ETag at Functions and Actions

* Defect/orderby navigation to on (#334)

* Enable order by to one associations

* Group By at sub queries

* Correct collection property select clause issues (#335)

* Enable nested lambda expressions (#336)

* Fix problem with expand and lambda to collection (#337)

* Set version to 2.1.3 (#338)

* Clean-up

* Add missed files

* Feature/release 2.1.3 (#339)

* Set version to 2.1.3

* Update readme

* Enable weak etags

* Add word

* Generalize unit test

* Feature/release 2.1.3 (#340)

* Set version to 2.1.3

* Update readme

* Enable weak etags

* Add word

* Generalize unit test

* Adopt validation header check to potential lower case conversion

* Defect/version 2.1.3 (#340)

* Feature/transient fields (#142)

* Fix null pointer if no enumerations are part of servcie

* Enable HAS and enumeration as return type of operations

* Allow Enumerations as operation parameter

* Provide java based operations converted enumeration

* Add SourceClear addon

* Delete SourceClean addon

* Enumerations at UDF functions

- Works for bound functions
- Works for functions with import

* Correct unit tests

* Enable multiple values for flags enumerations

* Switch detection default between Embedded and Entity type

* Allow collection attributes for metadata

* Enable query without collection attributes

* Rework query result conversion to reduce memory consumtion

* Missing Metadata pom

* First step entity with collections as return of function/action

* Bugfix: Expand on Parent with $filter on navigation path

* Enable the use of Join Tables

- Filter on navigation via Join Table generally not supported

* Create new query for inlinecount

* Enable Join Tables@Navigation Filter

- Not working mapped associations
- Not working $count

* Enable Join Tables@Navigation Filter

- With mapped associations
- With $count, know issue EclipsLink two sub types

* Increase Version --> 0.2.6

* Remove deprecated JPAExecutableQuery

* Bugfix: unidirectional join table based association

* Access collection properties via navigation

- New version

* Access collection properties w and w/o $select

* Access collection properties which are part of complex property

* CUD operations on collection properties

* Filter on collection properties pre optimization

* Filter on collection properties any/all

* Filter on collection w/o filter on $count and orderby $count

* Correct issue #29

- Correct /$count implementation in JPAJoinQuery
- Clean-up Hibernate differences
-- Subquery from clause
-- Id Class determination

* Increase Version to 0.2.7

* Enable [email protected] in case of odata.metadata=full

- links@complex types not yet working

* Preparation for solution of issue OLINGO-1143

* Correct NullPointer and some clean-ups

* Support order by $count

- Increase version to 0.2.8

* Intermediate merge clean-up

* Solve merge problem navigate complex collections

* Resolve merge conflict converter

* Correct error collection property and expand=*

* Enable filter $count on collection property

* Update version and url

* Create and use page provider

* Recreate change for solution of issue OLINGO-1143

* Finalize top level server driven paging

* Correct string handling error

* Correct link problem

* Enable skiptoken to have other type than String

* Move paging so next request injects old uriInfo correctly

* Enable deep insert via complex properties

* Ignore test for next commit

* Enable create of a new entity linked by a to one using PATCH

* Update to Olingo 4.5.0

- use new Olingo version
- adopt one test to changed @odata.context content

* Collection attributes rework. Issue #60

- Change processor pom  -> javax.servlet became provided

* Enable annotation for properties to mark them authorization relevant

* Enable multiple protected properties at complex attributes

* Rework EdmProtectedBy annotation to handle multiple claims at complex

* Process protection

* Rework handling of ignored protected

* Made inner class static

* Fixing issue #60

* $count query not working correctly on complex collection attributes

* Various small bugs

- Reorg.  pom.xml
- Correct http status on empty result
- Correct empty check for collection properties

* Correct typo in interface JPAODataPagingProvider

* Prepare JPAODataDatabaseTableFunction for paging

* Change to HSQLDB

* Remove function from sql-file to work around problems with Derby

* Correct NullPointerException EdmEntitySetResult

* Determine result of create dependent based on before image

* EntityType getAttribute did not return value for embedded id

* Provide CUD example and correct query status codes

* Correct query response

* Maven Archetype for Spring based service

* Upgrade to Junit5 to get support for Java > 1.8

* Extract interface for better unit test support

- Cleanup tests

* Clean-up interface implementation

* Add SQL function handling

* Complete DB function changes

* Clean-up test class

* Clean-up test class

* Update Version number

* Update Version number

* Additional test for API classes

* Enable suppress of wildcard in metadata

* Enable wildcards during query processing

* Increase information on error during filter

* Support of PUT on collection properties and primitive properties

* Fix Null Pointer on PATCH with return != minimal

* Claims where not respected by queries issue #69 part one

- /$count
- ?$count=true
- paging queries

* Claims where not respected by queries issue #69 part two

- $filter
- Update on Olingo 4.6.0

* Restrict the DISTINCT to protections only

* Increase test coverage

- New tests
- Rework vocabulary handling

* Cleanup Vocabularies II

- Add Action and Function
- Remove NavigationProperty and dependent

* Additional test and solution of issue #78

* Enable new annotation EdmVisibleFor at properties

* Introduction of Request Context

- Deprecation of two variants of JPAODataGetHandler.process
- Increase test coverage

* Restrict EdmVisiableFor to nullable non key attributes

* Skip properties from selection that do not belong to provided group

* Handle collection properties and navigation path

* Enable groups at complex collections

* Handle OrderBy clause

* Correct unit test

* Rework test containing images

* Rework context handling

- Move of cud handler to request context
- Move of DebugSupport to request context (is request specific because
of isUserAuthorized)
- Introduction of builder for Service Context to get a leaner creation
of handler

* Providing groups during modifying requests

* Re-enable old shortcut with late metadata provisioning

* Update pom for missing jackson dependency

* Update Archetype to version 0.3.4

* Update Version

* Extension of session context, so an…
  • Loading branch information
3 people authored Nov 22, 2024
1 parent 3bafc49 commit 9bd2b43
Show file tree
Hide file tree
Showing 109 changed files with 2,423 additions and 694 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_PROJECT: ${{secrets.SONAR_PROJECT}}
SONAR_ORG: ${{vars.SONAR_ORG}}
SONAR_ORG: ${{secrets.SONAR_ORG}}
SONAR_URL: https://sonarcloud.io
run: cd ./jpa && mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.organization=${SONAR_ORG} -Dsonar.projectKey=${SONAR_PROJECT} -Dsonar.host.url=${SONAR_URL} -Dsonar.projectKey=SAP_olingo-jpa-processor-v4 -Dsonar.token=${SONAR_TOKEN}
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ tmp/
*.md.html
local.properties
.loadpath

# Eclipse Core


# External tool builders
.externalToolBuilders/

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
[![REUSE status](https://api.reuse.software/badge/github.com/SAP/olingo-jpa-processor-v4)](https://api.reuse.software/info/github.com/SAP/olingo-jpa-processor-v4)
![GitHub last commit (develop)](https://img.shields.io/github/last-commit/SAP/OLINGO-JPA-PROCESSOR-V4/main.svg)
[![GitHub release](https://img.shields.io/github/release-pre/sap/olingo-jpa-processor-v4.svg?color=orange&label=release)](https://github.com/SAP/olingo-jpa-processor-v4/releases/)
[![Project Map](https://sourcespy.com/shield.svg)](https://sourcespy.com/github/sapolingojpaprocessorv4/)

The JPA Processor shall fill the gap between [Olingo V4](https://olingo.apache.org/doc/odata4/index.html) and the database, if [JPA](https://en.wikipedia.org/wiki/Java_Persistence_API) is used for object-relational mapping. If you want to be updated about Olingo changes subscribe to Olingo's [user mailing list]([email protected]).

Expand Down Expand Up @@ -47,7 +46,7 @@ clone the repository, import the projects and declare a dependency to either the
<dependency>
<groupId>com.sap.olingo</groupId>
<artifactId>odata-jpa-metadata</artifactId>
<version>2.2.0</version>
<version>2.3.0</version>
</dependency>
```

Expand All @@ -57,7 +56,7 @@ Or to the complete processor:
<dependency>
<groupId>com.sap.olingo</groupId>
<artifactId>odata-jpa-processor</artifactId>
<version>2.2.0</version>
<version>2.3.0</version>
</dependency>
```

Expand Down Expand Up @@ -103,4 +102,5 @@ Detailed information including third-party components and their licensing/copyri
|2.1.0| - Enhancement of annotation API<br>- Enhancement of API for server driven paging<br>- Optional support of IN operand <br>- Update to Olingo 5.0.0<br>- Rework $count implementation<br>- Fix problem with $count on collection properties|No|
|2.1.1| - Fix for issue [#292](https://github.com/SAP/olingo-jpa-processor-v4/issues/292)|No|
|2.1.3| - Fix for issue [#319](https://github.com/SAP/olingo-jpa-processor-v4/issues/319)<br> - Fix for issue [#325](https://github.com/SAP/olingo-jpa-processor-v4/issues/325)<br> - Fix for issue [#327](https://github.com/SAP/olingo-jpa-processor-v4/issues/327)<br> - Fix for issue [#331](https://github.com/SAP/olingo-jpa-processor-v4/issues/331)<br> - Fix of en issue with $orderby and _to one_ navigation properties |No|
|2.2.0| - Fix for issue [#378](https://github.com/SAP/olingo-jpa-processor-v4/issues/378)<br> - Fix for issue [#376](https://github.com/SAP/olingo-jpa-processor-v4/issues/376)<br> - Fix for issue [#361](https://github.com/SAP/olingo-jpa-processor-v4/issues/361)<br> - Fix for issue [#352](https://github.com/SAP/olingo-jpa-processor-v4/issues/352)<br> - Fix for issue [#307](https://github.com/SAP/olingo-jpa-processor-v4/issues/307) <br> - Enhancement according to [#314](https://github.com/SAP/olingo-jpa-processor-v4/issues/314)|No|
|2.2.0| - Fix for issue [#378](https://github.com/SAP/olingo-jpa-processor-v4/issues/378)<br> - Fix for issue [#378](https://github.com/SAP/olingo-jpa-processor-v4/issues/378)<br> - Fix for issue [#361](https://github.com/SAP/olingo-jpa-processor-v4/issues/361)<br> - Fix for issue [#352](https://github.com/SAP/olingo-jpa-processor-v4/issues/352)<br> - Fix for issue [#307](https://github.com/SAP/olingo-jpa-processor-v4/issues/307) <br> - Enhancement according to [#314](https://github.com/SAP/olingo-jpa-processor-v4/issues/314)|No|
|2.3.0| - Add support for handling multiple API version. Issue [#308](https://github.com/SAP/olingo-jpa-processor-v4/issues/308)<br> - Fix for issue [#359](https://github.com/SAP/olingo-jpa-processor-v4/issues/359)<br> - Fix for issue [#406](https://github.com/SAP/olingo-jpa-processor-v4/issues/406)<br> - Fix for issue [#397](https://github.com/SAP/olingo-jpa-processor-v4/issues/397)|No|
6 changes: 3 additions & 3 deletions jpa-archetype/odata-jpa-archetype-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.sap.olingo</groupId>
<artifactId>odata-jpa-archetype</artifactId>
<version>2.2.0</version>
<version>2.3.0</version>
</parent>
<artifactId>odata-jpa-archetype-spring</artifactId>
<name>Archetype - odata-jpa-archetype-spring</name>
Expand All @@ -17,15 +17,15 @@
<extension>
<groupId>org.apache.maven.archetype</groupId>
<artifactId>archetype-packaging</artifactId>
<version>3.3.0</version>
<version>3.3.1</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-archetype-plugin</artifactId>
<version>3.3.0</version>
<version>3.3.1</version>
<configuration>
<debug>true</debug>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</parent>

<properties>
<processor.version>2.2.0</processor.version>
<processor.version>2.3.0</processor.version>
<java.version>17</java.version>
<build.sourceEncoding>UTF-8</build.sourceEncoding>
<eclipselink.version>4.0.3</eclipselink.version>
Expand Down
7 changes: 3 additions & 4 deletions jpa-archetype/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.sap.olingo</groupId>
<artifactId>odata-jpa-archetype</artifactId>
<version>2.2.0</version>
<version>2.3.0</version>
<packaging>pom</packaging>
<url>https://github.com/SAP/olingo-jpa-processor-v4</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.source>17</project.build.source>
<odata.jpa.version>2.2.0</odata.jpa.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.source>17</project.build.source>
</properties>

<modules>
Expand Down
274 changes: 274 additions & 0 deletions jpa-tutorial/Questions/HowToHandleApiVersions.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,274 @@
= How to handle multiple API versions?

== Introduction

During the lifetime of an API it can happen that the API needs to be adopted. Some of these adoptions are incompatible.
That is, a client needs to be adopted as well to be able to handle the change. Typical incompatible changes are:

* Making a property mandatory.
* Changing the name of a property.
* Combining two properties or splitting a property.
* Removing an entity or an operation.
* ...

But even adding a non mandatory property can be incompatible in case a client can not handle unknown properties.
In all these cases the server has to provide two versions of the API till all clients have been adopted.
Starting with release 2.3.0 the JPA Processor supports multiple versions.

== Basic Idea

Instead of having a version annotation at the entities, the JPA Processor make use of multiple sets of JPA metadata.
An annotation has the risks that all entities need to be copied if one must be changed.

Metadata are (mainly) provided by the entity manager factory, so multiple entity manager factory are needed.
An option is to create multiple persistence units in the persistence.xml.
Using Spring Boot, we have also another option, which will be described below.

== Implementation


We assume that each entity or each aggregate has an own package e.g. `...model.tip` for the Trip entity and `...model.person` for the Person.
In case we like to create a new version of Trip, we need to create a new package e.g. `...model.v2.trip` and create the new version of the entity within it.

Using Spring Boot we need to make some preparation. First step is to deactivate https://www.baeldung.com/spring-open-session-in-vie[spring open session in view],
as we may get trouble having multiple beans for the entity manager factory. So we add the following to the application.yml or the corresponding to the application.properties:

[source, yaml]
----
spring:
jpa:
open-in-view: false
----

Next, we need to rearrange the creation of the entity manager factory.
First step is to create an abstract super class with the basic settings and a creation of the transaction manager:

[source, java]
----
public abstract class EclipseLinkJpaConfiguration extends JpaBaseConfiguration {
protected EclipseLinkJpaConfiguration(final DataSource dataSource, final JpaProperties properties,
final ObjectProvider<JtaTransactionManager> jtaTransactionManager) {
super(dataSource, properties, jtaTransactionManager);
}
@Override
protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
return new EclipseLinkJpaVendorAdapter();
}
@Override
protected Map<String, Object> getVendorProperties() {
// https://stackoverflow.com/questions/10769051/eclipselinkjpavendoradapter-instead-of-hibernatejpavendoradapter-issue
final HashMap<String, Object> jpaProperties = new HashMap<>();
jpaProperties.put(WEAVING, "false");
// No table generation by JPA
jpaProperties.put(DDL_GENERATION, "none");
jpaProperties.put(LOGGING_LEVEL, SessionLog.FINE_LABEL);
jpaProperties.put(TRANSACTION_TYPE, "RESOURCE_LOCAL");
// do not cache entities locally, as this causes problems if multiple application instances are used
jpaProperties.put(CACHE_SHARED_DEFAULT, "false");
// You can also tweak your application performance by configuring your database connection pool.
// https://www.eclipse.org/eclipselink/documentation/2.7/jpa/extensions/persistenceproperties_ref.htm#connectionpool
jpaProperties.put(CONNECTION_POOL_MAX, 50);
return jpaProperties;
}
String[] getMapping() {
final List<String> mappingResources = this.getProperties().getMappingResources();
return (!ObjectUtils.isEmpty(mappingResources) ? StringUtils.toStringArray(mappingResources) : null);
}
PlatformTransactionManager createTransactionManager(
final ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers,
final EntityManagerFactory entityManagerFactory) {
final JpaTransactionManager transactionManager = new JpaTransactionManager();
transactionManager.setEntityManagerFactory(entityManagerFactory);
transactionManagerCustomizers
.ifAvailable((customizers) -> customizers.customize((TransactionManager) transactionManager));
return transactionManager;
}
Builder basicSettings(final EntityManagerFactoryBuilder factoryBuilder) {
final Map<String, Object> vendorProperties = getVendorProperties();
customizeVendorProperties(vendorProperties);
return factoryBuilder
.dataSource(this.getDataSource())
.properties(vendorProperties)
.mappingResources(getMapping())
.jta(false);
}
}
----

Then we need to create the version specific entity manager factories.
Please note that with each version of the entity manager factory we also have to create a transaction manager.
It is also important that one of the beans for the factory has the name `entityManagerFactory`.
First the entity manager factory for the old version:

[source, java]
----
...
import org.example.model.planitem.PlanItem;
import org.example.model.trip.Trip;
...
@Configuration
public class JpaConfigurationV1 extends EclipseLinkJpaConfiguration {
protected JpaConfigurationV1(final DataSource dataSource, final JpaProperties properties,
final ObjectProvider<JtaTransactionManager> jtaTransactionManager) {
super(dataSource, properties, jtaTransactionManager);
}
@Bean("transactionManagerFactoryV1")
PlatformTransactionManager transactionManager(
final ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers,
@Qualifier("entityManagerFactory") final EntityManagerFactory entityManagerFactory) {
return createTransactionManager(transactionManagerCustomizers, entityManagerFactory);
}
@Override
@Bean("entityManagerFactory") // A bean with this name is needed
public LocalContainerEntityManagerFactoryBean entityManagerFactory(final EntityManagerFactoryBuilder factoryBuilder,
final PersistenceManagedTypes persistenceManagedTypes) {
return basicSettings(factoryBuilder)
.packages(Trip.class, PlanItem.class, OffsetDateTimeConverter.class)
.build();
}
}
----

And then the entity manager factory for the new version.
You need to look carefully to see the difference beside the bean names.
The important call here is in `entityManagerFactory`.
We provide the `EntityManagerFactoryBuilder` classes that represent the packages that contain the JPA entities.
The difference is that Trip is now in a different package.

[source, java]
----
...
import org.example.model.planitem.PlanItem;
import org.example.model.v2.trip.Trip;
...
@Configuration
public class JpaConfigurationV2 extends EclipseLinkJpaConfiguration {
protected JpaConfigurationV2(final DataSource dataSource, final JpaProperties properties,
final ObjectProvider<JtaTransactionManager> jtaTransactionManager) {
super(dataSource, properties, jtaTransactionManager);
}
@Bean("transactionManagerFactoryV2")
PlatformTransactionManager transactionManager(
final ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers,
@Qualifier("entityManagerFactoryV2") final EntityManagerFactory entityManagerFactoryV2) {
return createTransactionManager(transactionManagerCustomizers, entityManagerFactoryV2);
}
@Override
@Bean("entityManagerFactoryV2")
public LocalContainerEntityManagerFactoryBean entityManagerFactory(final EntityManagerFactoryBuilder factoryBuilder,
final PersistenceManagedTypes persistenceManagedTypes) {
return basicSettings(factoryBuilder)
.packages(Trip.class, PlanItem.class, OffsetDateTimeConverter.class)
.build();
}
}
----

Now the JPA Processor needs to know that it has to handle multiple versions.
The versions are defined in the session context, which we create in `ProcessorConfiguration`.
A description for a versions contains of:

* An id to identify the version later.
* The instance of the version specific entity manager factory.
* The version specific request mapping path, which is needed to make Olingo work together with Spring.
* The (type) packages containing the enumerations and operations.
* The metadata post processor

[IMPORTANT]
====
In case there are bound operations, so functions or actions, for the changed entity, also these
need to be adjusted and the corresponding packages need to be provided.
====

Here we only look at the bare minimum:

[source, java]
----
@Bean
JPAODataSessionContextAccess sessionContext(
@Qualifier("entityManagerFactoryV2") final EntityManagerFactory entityManagerFactoryV2,
@Qualifier("entityManagerFactory") final EntityManagerFactory entityManagerFactoryV1) throws ODataException {
return JPAODataServiceContext.with()
...
.setVersions(
JPAApiVersion.with()
.setId("V1")
.setEntityManagerFactory(entityManagerFactoryV1)
.setRequestMappingPath("Trippin/v1")
.build(),
JPAApiVersion.with()
.setId("V2")
.setEntityManagerFactory(entityManagerFactoryV2)
.setRequestMappingPath("Trippin/v2")
.build())
...
----

[NOTE]
====
There are also setters for all the information provided with a version.
In case a version is provided this is taken.
Otherwise, the information from the setter.
====


With this the design time part is finished and we have to adopt the runtime part.
For each request we need to decide if it is for version one or for version two.
This is done by checking if the request URI is for version one or two.
The version id we have determined is provided to the request context:

[source, java]
----
@Bean
@Scope(scopeName = SCOPE_REQUEST)
JPAODataRequestContext requestContext() {
final HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes())
.getRequest();
return JPAODataRequestContext.with()
...
.setVersion(determineVersion(request))
.build();
}
private String determineVersion(final HttpServletRequest request) {
return request.getRequestURI().toUpperCase().startsWith("/TRIPPIN/V2/") ? "V2" : "V1";
}
----

As a last step we have to adopt the controller, so that it accepts requests for all versions.
Alternatively, we could also create a separate controller, so we would have one accepting requests
for version 1 and one accepting requests for version 2.
But to keep things simple, we just change annotation `@RequestMapping`:

[source, java]
----
@RestController
@RequestMapping("Trippin/")
@RequestScope
public class ODataController {
...
}
----

Now we can start the service and perform requests like: `/Trippin/v1/$metadata` or `/Trippin/v2/$metadata`.
1 change: 1 addition & 0 deletions jpa-tutorial/Questions/Questions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Having done that, we are ready to go ahead:
. xref:HowToMakeUseOfAnnotations.adoc[How to make use of Annotations?]
. xref:HowToBuildServerDrivenPaging.adoc[How to build server-driven paging?]
. xref:HowToBuildServerDrivenPagingExpand.adoc[How to build server driven-paging for $expand?]
. xref:HowToHandleApiVersions.adoc[How to handle multiple API versions?]

Some things that are good to know:

Expand Down
2 changes: 1 addition & 1 deletion jpa/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ target/
.settings/
.metadata
*.log
/.dbeaver/
/old.project
/Scripts/
/.dbeaver/
Loading

0 comments on commit 9bd2b43

Please sign in to comment.