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
If no columns are given, all columns are selected by default.
If columns are specified, only these are selected.
Joins normally triggered by columns from 1:1 relationships are not implemented, and the corresponding columns don't get loaded and can't be specified in a query.
Limiting columns is not supported for single query loading.
Closes#1803
Original pull request: #1967
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
Uses new switch syntax.
Signed-off-by: mipo256 <mikhailpolivakha@gmail.com>
Commit message changed by Jens Schauder
Original pull request #2000
See #1998
Query methods that are not derived methods now cause an exception, when they are annotated with `@Lock`, since this combination is not supported.
Before they just logged a warning.
Comment edited by Jens Schauder
Signed-off-by: mipo256 <mikhailpolivakha@gmail.com>
We now raise the exceptions from `NamedParameterJdbcTemplate` directly.
If you used to extract the `cause` of a `DbActionExecutionException` you should now catch that Exception directly.
Original pull request #1956Closes#831
Signed-off-by: mipo256 <mikhailpolivakha@gmail.com>
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
On some occasions where col in (:args) contain a really lot args, 10k+ for instance, this commit fixes a performance (high CPU) bug by NOT traversing the whole map in basically O(n^2) manner
Signed-off-by: Mikhail Fedorov <mfedorov761@gmail.com>
Squashed by Jens Schauder
Original pull request #2050
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