We now provide AOT support to generate repository implementations during build-time for JDBC repository query methods.
Supported Features
Derived query methods, @Query and named query methods
* @Modifying methods returning void, int, and long
* Pagination, Slice, Stream, and Optional return types
* DTO and Interface Projections
* Value Expressions
Excluded methods
* CrudRepository, Querydsl, Query by Example, and other base interface methods as their implementation is provided by the base class respective fragments
* Methods whose implementation would be overly complex
* Methods accepting ScrollPosition (e.g. Keyset pagination)
Closes: #2121
Original pull request: #2124
Replace nullability annotations with their JSpecify equivalents.
Enable checking this annotations at compile time using Errorprone and NullAway.
Closes#1980
Original pull request: #2126
We now support querying, updating, sorting and projecting embeddables by resolving these to their individual columns.
Closes#2011
Original pull request: #2114
Use Standard Exception handling for JDBC SQLException. Introduce easier and consistent mechanism to construct JdbcCustomConversions. Add tests and fix mocking setup. Fix typos.
See #1828
Original pull request #2062
Restructured reading conversion process into:
- converting technology base types (JDBC Arrays).
- standard and custom conversions.
- module specific conversions (AggregateReference).
Closes#1828
Original pull request #2062
Introduce factory methods to create mapping contexts that use quoting and that use plain identifiers for easier creation of the correct mapping context.
See #1993
Original pull request #2066
Most tests got fixed by reverting to non quoted identifiers for the test.
Interesting things that became obvious:
- SpEL expressions get the transformed (e.g. upper case) and quoted table name!? See TableNameQueryPreprocessorUnitTests and
SqlInspectingR2dbcRepositoryUnitTests
Closes#1993
Original pull request #2066
Entities may be annotated with `@Id` and `@Embedded`, resulting in a composite id on the database side.
The full embedded entity is considered the id, and therefore the check for determining if an aggregate is considered a new aggregate requiring an insert or an existing one, asking for an update is based on that entity, not its elements.
Most use cases will require a custom `BeforeConvertCallback` to set the id for new aggregate.
For an entity with `@Embedded` id, the back reference used in tables for referenced entities consists of multiple columns, each named by a concatenation of <table-name> + `_` + <column-name>.
E.g. the back reference to a `Person` entity, with a composite id with the properties `firstName` and `lastName` will consist of the two columns `PERSON_FIRST_NAME` and `PERSON_LAST_NAME`.
This holds for directly referenced entities as well as `List`, `Set` and `Map`.
Closes#574
Original pull request #1957
Overriding the proper variant of EntityInformation is now possible because we no longer utilize a private method in addition to the public one leading to partial customization of EntityInformation.
Closes#2053
Extract SequenceEntityCallbackDelegate from IdGeneratingBeforeSaveCallback. Renameto IdGeneratingEntityCallback and move callback to convert package.
Align return values and associate generated sequence value with the entity. Fix test. Add ticket references to tests.
Extract documentation partials.
See #1955
Original pull request: #2028