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
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
+ 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 #1226Closes#1212
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
+ 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#1199Closes#1201
Original pull request #1208
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
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.
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
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
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
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
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
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
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
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
java.sql.Types constants are int values and therefore make it tedious to read and debug the code.
SQLType values are mostly enum constants which are much nicer to use.
Original pull request #1142
This is achieved by passing the full availabe type information of the conversion target to the conversion service.
This broke a test which wasn't functional in the first place which becomes obvious when adding the proper assertion.
Closes#1046
Original pull request #1144