Commit Graph

1798 Commits

Author SHA1 Message Date
John Blum
483b30e8c2 Remove punctuation in Exception messages.
Closes #1259.
2022-06-08 12:16:37 -07:00
Jens Schauder
6911bfba98 Polishing.
Introduces the BatchedActions abstraction to encapsulate the different ways singular actions get combined into batched actions.

Original pull request #1230
Original pull request #1229
Original pull request #1228
Original pull request #1211
2022-06-08 14:54:19 +02:00
Chirag Tailor
64a07e608d Add DeleteBatchingAggregateChange to batch deletes when deleting multiple aggregate roots.
+ Rename DefaultAggregateChange to DeleteAggregateChange.

Original pull request #1230
2022-06-08 14:54:19 +02:00
Jens Schauder
cf6e174088 Polishing.
Original pull request #1229
2022-06-08 14:54:18 +02:00
Chirag Tailor
aa1610d381 Update SaveBatchingAggregateChange to batch Delete actions.
Original pull request #1229
2022-06-08 14:53:51 +02:00
Jens Schauder
64d9bbbd55 Polishing.
Original pull request #1228
2022-06-08 14:53:51 +02:00
Chirag Tailor
ec3cec3be3 Update SaveBatchingAggregateChange to batch InsertRoot actions.
Original pull request #1228
2022-06-08 14:53:30 +02:00
Jens Schauder
c1164383d6 Polishing.
Original pull request #1211
2022-06-08 14:53:30 +02:00
Chirag Tailor
6b02a4e627 Add SaveMergedAggregateChange which merges AggregateChangeWithRoot changes into one.
Remove behavior from WritingContext for creating InsertBatch in favor of SaveMergedAggregateChange.

Update all save paths to use SaveMergedAggregateChange.

+ Update #populateIdsIfNecessary return type from T to List<T>

Pull out an abstract BatchWithValue class from InsertBatch to use it for batching root inserts as well.

Rename InsertBatch to BatchInsert
Rename AggregateChangeWithRoot to RootAggregateChange.

Original pull request #1211
2022-06-08 14:48:51 +02:00
Mark Paluch
d3d05039da Update CI properties.
See #1247
2022-06-03 09:34:21 +02:00
Mark Paluch
f038cf2af0 Upgrade to Maven Wrapper 3.8.5.
See #1256
2022-06-03 09:32:52 +02:00
Jens Schauder
63b0f5a01a Polishing.
See #1254
2022-06-01 12:46:20 +02:00
Jens Schauder
a5238fac85 Reestablish previous exception behavior.
When saving an Aggregate which is not new, but has a null version attribute we now throw a DbActionExecutionException, like we used to.

Closes #1254
2022-06-01 12:46:20 +02:00
Jens Schauder
ac583991ac Polishing.
Refactoring and code aesthetics.

See #1249
Original pull request #1250
2022-05-23 10:42:32 +02:00
Jens Schauder
dcd4ef0cdc Support readonly properties for references.
The `@ReadOnlyProperty` annotation is now honoured for references to entities or collections of entities.

For tables mapped to such annotated references, no insert, delete or update statements will be created.
The user has to maintain that data through some other means.
These could be triggers or external process or `ON DELETE CASCADE` configuration in the database schema.

Closes #1249
Original pull request #1250
2022-05-23 10:42:31 +02:00
Jens Schauder
274fcd7e87 Polishing.
Original pull request #1226
See #1212
2022-05-17 14:43:58 +02:00
Chirag Tailor
64a7c5595a Update @Query argument conversion to handle Collection<Enum>.
+ Copy logic from QueryMapper#convertToJdbcValue to resolve Iterable
  arguments on findBy* query methods to resolve the same for @Query.
+ Use parameter ResolvableType instead of Class to retain generics info.

Original pull request #1226
Closes #1212
2022-05-17 14:43:04 +02:00
John Blum
0dcd870e6a Remove Docker Registry login.
Closes #1248.
2022-05-16 11:23:03 -07:00
Jens Schauder
e6ff3859ed Drop support for H2 1.x.
Closes #1243
2022-05-16 14:00:09 +02:00
Christoph Strobl
76983827d5 Fix pom.xml formatting.
This commit reverts formatting changes introduced via fd86f429e7.

See #1206
2022-05-13 13:52:11 +02:00
Christoph Strobl
4ec8ac2667 After release cleanups.
See #1206
2022-05-13 10:53:27 +02:00
Christoph Strobl
b671f48a2c Prepare next development iteration.
See #1206
2022-05-13 10:53:24 +02:00
Christoph Strobl
4e82d9d496 Release version 3.0 M4 (2022.0.0).
See #1206
2022-05-13 10:44:01 +02:00
Christoph Strobl
fd86f429e7 Prepare 3.0 M4 (2022.0.0).
See #1206
2022-05-13 10:43:21 +02:00
Jens Schauder
f6d31eeb4c Downgrade to mybatis-spring 2.0.7.
Since at the time of the release only snapshot releases of mybatis-spring 2.1 are available we decided to downgrade to 2.0.7. for the release.

Unfortunately that release is not compatible with the current milestone of Spring Framework and therefore the MyBatis integration is broken.

If you want to use MyBatis with this release, manually add a dependency to mybatis-spring 2.1.0-SNAPSHOT.

Closes #1245
2022-05-13 09:14:44 +02:00
Jens Schauder
053476f86b Upgrade Maria DB JDBC driver version to 2.7.5.
Closes #1244
2022-05-12 15:45:51 +02:00
Jens Schauder
ef54dfebca Upgrade Arch Unit version to 0.23.1.
Closes #1242
2022-05-12 12:34:29 +02:00
Jens Schauder
9f31497811 Upgrade Awaitility version to 4.2.0.
Closes #1241
2022-05-12 12:34:29 +02:00
Jens Schauder
64aa6ec9ab Upgrade Postgresql JDBC driver version to 42.3.5.
Closes #1240
2022-05-12 12:34:29 +02:00
Jens Schauder
91e5da10d5 Upgrade MySql JDBC driver version to 8.029.
Closes #1239
2022-05-12 12:34:29 +02:00
Jens Schauder
f2e05f6af3 Upgrade HSQLDB JDBC driver version to 2.6.1.
Closes #1238
2022-05-12 12:34:29 +02:00
Jens Schauder
bd037c9575 Upgrade DB2 JDBC driver version to 11.5.7.0.
Closes #1237
2022-05-12 12:34:28 +02:00
Jens Schauder
4353dc8e06 Improve and clarify documentation of callbacks.
This also removes deprecated Events and Callbacks.

Closes #1236
2022-05-11 15:45:03 +02:00
Mark Paluch
f6e7792094 Polishing.
Introduce Query.isLimited method to avoid magic numbers.

See #1233
Original pull request: #1233.
2022-04-29 11:06:40 +02:00
Robert Heim
76ed7e23e4 Do not override existing limit in R2dbcEntityTemplate.selectOne.
Closes #1233
2022-04-29 11:00:41 +02:00
Mark Paluch
1ae5174c4c Remove …ConverterOverride converters in favor of R2dbcCustomConversionsConfiguration converter filters.
Closes #1225
2022-04-20 14:34:49 +02:00
Jens Schauder
e874f01f7f Upgrade Mybatis Version to 3.5.9
Closes #1221
2022-04-19 11:38:25 +02:00
Jens Schauder
0ac8aa8411 Upgrade Mybatis Spring Version to 2.1.0-SNAPSHOT
This fixes the current build problems, which are caused by removal of NestedIOException from Spring Framework.

Closes #1218
See mybatis/spring#663
2022-04-19 11:37:56 +02:00
Jens Schauder
f2dc64ec52 Polishing.
Formatting and comments.

See #1201
See #1199
Original pull request #1208
2022-03-29 10:10:11 +02:00
Chirag Tailor
508791b7df Capture execution results for update db actions to fix root references with immutably typed ids.
+ Added #getIdValueSource to DbAction.WithEntity since it now applies to all such DbAction.
+ Removed DbAction.WithGeneratedId in favor of DbAction.WithEntity where it was used.

Removes unused DbAction.Update.

Passes the root from BeforeSaveCallback through to InsertRoot,UpdateRoot
actions.

+ Isolate aggregate change #getEntity #setEntity behaviors into a new
interface for "save" changes.
+ Extract #setEntity from DbAction.WithEntity to a new DbAction interface
just for root actions.
+ JdbcAggregateChangeExecutionContext#populateIdsIfNecessary returns the root entity
from DbAction.InsertRoot or DbAction.UpdateRoot regardless of the immutability of
its @Id property.

Closes #1199
Closes #1201
Original pull request #1208
2022-03-29 10:07:54 +02:00
Jens Schauder
0500442ac3 Change branch for CI trigger. 2022-03-23 16:24:02 +01:00
Jens Schauder
657e9cac65 Polishing.
Changed default behaviour to an empty name for embedded entities.
This allows to use embedded entities for column tuples without special prefix.

Original pull request #1149
2022-03-23 15:31:59 +01:00
Daniil Razorenov
b53e4e6091 Fix assemble table alias for embedded entity with empty prefix and reference.
Table alias for embedded entity use prefix value from Embedded annotation. But default value for prefix is empty string. If try to create SqlIdentifier for empty string it throw exception. To avoid this behavior, if prefix is an empty string, property name for embedded entity is taken instead.
2022-03-23 15:31:59 +01:00
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