We now read the domain type instead of trying to materialize an interface if the type returned from the query method is implemented by the domain object handled by the repository.
Closes#519
We now apply the UPPER function regardless of whether we could resolve the criteria property to a column. Previously, we required a resolved property of a String type which prevented non-mapped properties from case-insensitive queries.
Closes#518
We now differentiate the result mapping based on projection type and query type. Previously, all projections used the domain type to map results first and then serve as backend for the projection proxy/DTO creation.
We now use direct result to DTO mapping for String-based queries to allow for a greater flexibility when declaring DTO result types. Interface-based projections and derived queries remain using the two-step process of result to domain type mapping and then mapping the domain type into the projection.
We now invoke the converter for query arguments of String-based queries (using the Query annotation or named queries) to convert the value into a type that can be used by the driver.
Previously all values were passed-thru which caused for e.g. enums to pass-thru these to the driver and the driver encode failed.
Results projected onto simple and primitive types that are null are no longer emitted.
A SQL query SELECT MAX(age) FROM my_table that returns a SQL NULL and that would be consumed as Long.class (Publisher<Long>) is an example for a primitive type that can be null. Since Reactive Streams prohibits the propagation of null values by a Publisher to a Subscriber the only viable option is to suppress null results by wrapping the mapping function into Optional result values and filter these values later to avoid null being emitted.
We now map results of exists queries to a boolean flag to ensure proper decoding. Previously, results were attempted to be mapped onto a primitive type which failed as there's no converter registered for Row to Boolean.
R2DBC Postgres Geo-types are now considered simple types that are passed-thru to the driver without further mapping. Types such as io.r2dbc.postgresql.codec.Circle or io.r2dbc.postgresql.codec.Box can be used directly in domain models and as bind parameters.
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.