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
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
Deprecate original DialectResolver and JdbcArrayColumns as they've been in the wrong package and introduce replacements in the dialect package. Let deprecated types extend from their replacements to retain compatibility.
Make instance holders final, fix Javadoc typos, update reference docs.
Original pull request #2036
See #2031
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
Refine assignment flow and use early returns where possible. Cache empty MapSqlParameterSource. Reduce dependency on RelationalMappingContext using a lower-level abstraction signature. Simplify names. Use default value check from Commons. Fix log warning message. Add missing since tags.
Remove superfluous annotations and redundant code. Tweak documentation wording.
Closes#2003
Original pull request: #2005
Reference issues in tests comments.
Removed `DisabledOnDatabase`
IdGeneration default methods related to sequence generation are now internally consistent.
Formatting and naming.
IdGeneration offers simple support by default.
Fix exception in oracle integration test setup
Use SqlIdentifier for sequence names
Remove SEQUENCE id source
Added documentation
See #1923
Original pull request #1955
Collection valued attributes now get ignored.
Before RelationalExampleMapper tried to generate predicates for these, resulting in invalid SQL.
Closes#1969
SpEL expressions in queries get processed in two steps:
1. First SpEL expressions outside parameters are detected and processed.
This is done with a `StandardEvaluationContext` with the variables `tableName` and `qualifiedTableName` added.
This step is introduced by this commit.
2. Parameters made up by SpEL expressions are processed as usual.
Closes#1856
Original pull request #1863