Commit Graph

1605 Commits

Author SHA1 Message Date
Jens Schauder
a4d2f1ef05 Polishing.
This change extracts entity modifying behaviour into separate methods, so it doesn't appear as an unexpected side effect of the creation of aggregate changes.

Also some formatting.

Original pull request #1196
See #1137
2022-03-22 17:10:41 +01:00
Chirag Tailor
6500bfed3a Determine and set the value for entity @Version before conversion to DbActions to simplify execution context.
This change incorporates one test from https://github.com/spring-projects/spring-data-relational/pull/1150

Original pull request #1196
Closes #1137
2022-03-22 17:10:41 +01:00
Mark Paluch
7e7c555466 After release cleanups.
See #1205
2022-03-22 14:07:39 +01:00
Mark Paluch
86e36b08f6 Prepare next development iteration.
See #1205
2022-03-22 14:07:37 +01:00
Mark Paluch
755dc05502 Release version 3.0 M3 (2022.0.0).
See #1205
2022-03-22 14:00:24 +01:00
Mark Paluch
6ffe53553a Prepare 3.0 M3 (2022.0.0).
See #1205
2022-03-22 14:00:02 +01:00
Chirag Tailor
2ee908c217 Update java and reference doc info on lifecycle events/callbacks.
Original pull request #1200
2022-03-22 13:23:42 +01:00
Mark Paluch
a8127e05ff After release cleanups.
See #1132
2022-03-21 16:44:42 +01:00
Mark Paluch
8aeb9bfb97 Prepare next development iteration.
See #1132
2022-03-21 16:44:40 +01:00
Mark Paluch
7f2534a384 Release version 3.0 M2 (2022.0.0).
See #1132
2022-03-21 16:35:09 +01:00
Mark Paluch
cd6e47cae4 Prepare 3.0 M2 (2022.0.0).
See #1132
2022-03-21 16:34:38 +01:00
Mark Paluch
32ec464572 Disable package cycle tests.
Property Converters introduced a cycle so we're disabling the tests for now as we cannot resolve these from here.

See #1132
2022-03-21 08:47:36 +01:00
Mark Paluch
2831685c9d Adopt to Spring R2DBC changes.
Update counts now return Long instead of Integer.

Closes #1198
2022-03-18 08:56:09 +01:00
Mark Paluch
ce83eacfd1 Upgrade to netty 4.1.75.Final.
See #1197
2022-03-18 08:43:06 +01:00
Mark Paluch
6d9cf19a8f Upgrade to R2DBC Borca-SR1.
Closes #1197
2022-03-18 08:42:51 +01:00
Jens Schauder
e019b3695a Polishing.
Formatting.

See #1159
Original pull request # 1191
2022-03-16 14:28:01 +01:00
Chirag Tailor
226bb71708 Batch inserts of referenced entities.
Insert for entities of same type within an aggregate get inserted using JDBC batch operations when possible.

Inserts are supported when no id needs to be generated by the database or if the Dialect supports generation of ids in batch operations.

Closes #1159
Original pull request # 1191
2022-03-16 14:27:44 +01:00
Meng Zuozhu
13b48993b2 Fix toString for negated conditions.
Original pull request #1193
2022-03-11 08:33:59 +01:00
Jens Schauder
325d9cc89c Polishing.
Run tests only for a single database since it is actually not testing anything database related.

Formatting.

Original pull request #1187
See #1043
2022-03-07 15:11:27 +01:00
Diego Krupitza
246343f477 Introduced queryLookupStrategy to EnableJdbcRepositories.
Added the missing functionality that is found in the documentation of spring-data-jdbc, but was not present in the code as functionality. Users can not choose between various QueryLookupStrategies.

Closes #1043
Original pull request #1187
2022-03-07 15:11:13 +01:00
Mark Paluch
eb197ee064 Polishing.
Reduce test method visibility.

Orginal pull request #1188
2022-03-01 14:41:52 +01:00
Mark Paluch
05e96557bd Associate value with isTrue/isFalse criteria operators.
We now associate a boolean value with both operators as those operators are rendered using equals comparison in the actual SQL text.

Orginal pull request #1188
2022-03-01 14:41:14 +01:00
Jens Schauder
eabcee7c4e Polishing.
Standardized GitHub references of tests.

Original pull request spring-projects/spring-data-r2dbc/pull/691
2022-02-23 11:00:55 +01:00
Jens Schauder
36c332bf87 Polishing.
Refactored the assertions towards a custom assertion class, taking care of limited parsing of the generated SQL statements.

Original pull request spring-projects/spring-data-r2dbc/pull/691
2022-02-23 11:00:55 +01:00
Auzel
15f46e42c2 Fixes flaky tests in PartTreeR2dbcQueryUnitTests.java
The order of selected columns depended on the nondeterministic behavior of getDeclaredFields.

Original pull request spring-projects/spring-data-r2dbc/pull/691
2022-02-23 10:49:04 +01:00
Jens Schauder
56ece619d2 Polishing.
See spring-projects/spring-data-jdbc/issues/1041
Original pull request spring-projects/spring-data-r2dbc/pull/720
2022-02-22 16:17:22 +01:00
Diego Krupitza
910c34014d Introduced pessimistic locks for derived queries.
Methods which use the derive query functionality now can be annotated with `@Lock` to used a given `LockMode`. Right now there are two different modes `PESSIMISTIC_READ` and `PESSIMISTIC_WRITE`. Based on the dialect the right select is generated. For example for H2 `Select ... FOR UPDATE`.

Closes spring-projects/spring-data-jdbc#1041
See #643,
Original pull request spring-projects/spring-data-jdbc/pull/1158
2022-02-22 16:17:22 +01:00
Jens Schauder
4edb39800e Move Lock to relational module.
This allows both Spring Data R2DBC and Spring Data JDBC to use the same annotation.

See spring-projects/spring-data-jdbc/issues/1041, spring-projects/spring-data-r2dbc/pull/720, spring-projects/spring-data-jdbc/pull/1158
2022-02-22 16:17:22 +01:00
Mark Paluch
efb48bc222 Update CI properties.
See #1132
2022-02-22 14:10:51 +01:00
Jens Schauder
a4e04dde56 Avoid conversion when return value is null.
Closes #1167
2022-02-21 15:16:28 +01:00
Mark Paluch
71cad5ff2c Polishing.
Align Oracle container versions for testing.

See #1179
2022-02-21 13:31:57 +01:00
Diego Krupitza
66d1e54179 Remove unnecessary toString() call.
There were few explicit `toString()` calls that are not needed, since `toString()` will be called by default.

Original pull request #1172
2022-02-21 11:11:52 +01:00
Diego Krupitza
7868dff4b8 StringBuilder can be replaced with String concatenation.
In this case the usage of `StringBuilder` has no additional benefit, since it is not inside a loop where the JVM may have problems detecting String concatenation that can be optimized. The usage of "simple" String concatenation makes the code more readable and the code will be automatically optimised by the compiler.

Original pull request #1173
2022-02-21 11:00:57 +01:00
Mark Paluch
9a42776381 Import Spring Data R2DBC module into Spring Data Relational.
Closes #1179
2022-02-21 10:43:01 +01:00
Mark Paluch
824885e2ad Add 'spring-data-r2dbc/' from commit '6289f4de9bf89f1d371ea3ae8810865a20beca9c'
git-subtree-dir: spring-data-r2dbc
git-subtree-mainline: c1c38a71d6
git-subtree-split: 6289f4de9b
2022-02-21 10:26:05 +01:00
Christoph Strobl
6289f4de9b Update copyright year to 2022.
See: #722
2022-02-17 14:45:17 +01:00
Christoph Strobl
c1c38a71d6 Update copyright year to 2022.
See: #1168
2022-02-17 13:56:04 +01:00
Oliver Drotbohm
4218d5a321 Adapt to changes in entity creation metadata APIs in Spring Data Commons. 2022-02-16 08:04:35 +01:00
Oliver Drotbohm
99d2f62646 Adapt to changes in entity creation metadata APIs in Spring Data Commons. 2022-02-16 08:01:00 +01:00
Greg L. Turnquist
7a991ff7ee Update CI properties.
See #1132
2022-02-15 09:00:21 -06:00
Greg L. Turnquist
0d3dbeba70 Update CI properties.
See #706
2022-02-15 09:00:20 -06:00
Jens Schauder
31dc93a0e2 Polishing.
Original pull request #1166
2022-02-15 11:49:01 +01:00
Diego Krupitza
55b6180d12 Added reference documentation for Lock on derived queries.
The reference documentation now contains how to use `@Lock` on derived queries and what to expect from it.

Original pull request #1166
2022-02-15 11:49:00 +01:00
Jens Schauder
21a2228204 Fixes NPE in PersistentPropertyPathExtension.equals.
Closes #1164
2022-02-15 11:49:00 +01:00
Jens Schauder
606f63b2ab Polishing.
Adding references to issues on test annotations.
Made test methods package private.

See #1164
2022-02-15 11:49:00 +01:00
Jens Schauder
351ed47d7c Polishing.
Refactored the unit tests to include a negative case and to separate the different scenarios tested.

Removed the default LockMode from the Lock annotation.
I have the feeling that most users will assume an exclusive Lock when none is specified, but also don't want to request stronger locks than required.

Original pull request #1158
See #1041
2022-02-15 11:49:00 +01:00
Diego Krupitza
11a236402b Introduced pessimistic locks for derived queries.
Methods which use the derive query functionality now can be annotated with `@Lock` to used a given `LockMode`. Right now there are two different modes `PESSIMISTIC_READ` and `PESSIMISTIC_WRITE`. Based on the dialect the right select is generated. For example for HSQLDB `Select ... FOR UPDATE`.

See #1041
Original pull request #1158
2022-02-15 11:49:00 +01:00
Jan Michal
c0cd813f3d Fix a typo in the docs for query methods.
Original pull request #1163
2022-02-15 11:49:00 +01:00
Jens Schauder
4066df9cf9 Polishing.
Rename "null handling" to "null precedence".
This is somewhat inconsistent with commons null handling, but more descriptive.

Minor formatting.

Original pull request #1156
See #821
2022-02-15 11:49:00 +01:00
Chirag Tailor
60a59b61c1 Null precedence is now supported if the underlying database supports it.
Original pull request #1156
Closes #821
2022-02-15 11:48:59 +01:00