We now propagate auto-generated Id values to primitive Id properties if the value in the domain model is zero. This happens in addition to non-primitive values being null to ensure that generated values end up in the domain model.
Removed the language of oppression and violence
and replaced it with more neutral language.
Note that problematic words in the code have
to remain in the docs until the code changes.
We now initialize/increment the version of versioned entities (optimistic locking) after running the BeforeConvert callback. BeforeConvert callbacks may contain features such as auditing and if the auditing callback issues a isNew check, then the version would be already populated which leads to the auditing callback considering the entity not new anymore leaving the created date empty.
We now support the use of @Value in persistence constructors to compute values for constructor creation.
class MyDomainObject {
public MyDomainObject(long id, @Value("#root.my_column") String my_column, @Value("5+2") int computed) {
// …
}
}
ReactiveDataAccessStrategy is now deprecated in favor of using StatementMapper, UpdateMapper, and R2dbcConverter directly. The access strategy interface was introduced to allow pluggable access strategies in DatabaseClient. With moving DatabaseClient into Spring Framework, this approach is no longer required.
We now create R2dbcEntityTemplate as part of R2dbcRepositoryFactoryBean initialization if the factory bean was configured with DatabaseClient and DataAccessStrategy only. Creating the template in the factory bean allows collecting entity callbacks for repository usage.
We now provide EnumWriteSupport as base class for enum write converters that should be written as-is to the driver.
R2dbcCustomConversions can now also be created from a dialect for easier R2dbcCustomConversions creation.
We now exclude Id properties from being used in the INSERT field list if the Id value is zero and of a primitive type or if the value is null using a numeric wrapper type.
Line breaks after dots in ascii doctor file for easier reading of the source files.
Adds specific deprecation links instead of just links to the general package.
Removes an unused private method in `ConnectionFactoryUtils`
Original pull request: #412.
Added check for kotlin.Unit to AbstractR2dbcQuery#getExecutionToWrap. This case is essentially equivalent to a return type of Void, but the singleton Unit instance needs to be returned instead of discarding the result entirely.
It was also necessary to add a check to R2dbcQueryMethod#getEntityInformation, as otherwise a PersistentEntity is created for Unit, which leads to a new instance being created via reflection down the pipeline (which is probably not a thing that should happen).
Original pull request: #422.
We now provide auditing support that can be enabled through EnableR2dbcAuditing.
@Configuration
@EnableR2dbcAuditing
class Config {
@Bean
public ReactiveAuditorAware<String> myAuditorProvider() {
return new AuditorAwareImpl();
}
}
Guard find(Sort) against null values. Add author to documentation. Use ReactiveDataAccessStrategy in R2dbcEntityTemplate created in SimpleR2dbcRepository.
Original pull request: #408.
Implements ReactiveSortingRepository on SimpleR2dbcRepository. Also changed R2dbcRepository to extend ReactiveSortingRepository and updated comments where it felt reasonable.
Added a single unit test for the new method, and changed the base interface of LegoSetRepository in AbstractR2dbcRepositoryIntegrationTests for integration testing purposes.
Clarify documentation on reactive repository base interfaces
Adds some language calling out ReactiveSortingRepository and fixes consistency between related examples.
Original pull request: #408.
We now accept a bean reference to R2dbcEntityOperations so that a single application can scan for repositories that use different dialects/database systems.
Reintroduce deprecated setBeanFactory(…) method.
Extract code into methods.
Ensure that versioned entities are eagerly initialized to allow retries.
Original pull request: #397.
We now support entity callbacks for:
* AfterConvertCallback
* BeforeConvertCallback
* BeforeSaveCallback
* AfterSaveCallback
through R2dbcEntityTemplate.
Original pull request: #397.