We gather immutable entities of which the id has changed, in order to set them as values in the parent entity.
We now also gather unchanged entities.
So they get set with the changed one in the parent.
Closes#1907
Original pull request: #1920
In some cases, we currently use the traditional `instanceof` checks followed by explicit type casting.
With the introduction of pattern matching in recent Java versions, we can refactor these checks to make the code more concise and readable.
Original pull request #1868
Refactor convertAndAddParameter method to writeValue(…) decoupling responsibilities for a clearer value conversion code path. Also, refactor collection conversion to functional callback-style and extend test assertions.
See #1323
Original pull request: #1838
JdbcRepositoryEmbeddedIntegrationTests no longer runs for all databases, since it doesn't tests anything specific to differen RDBMSs.
Therefore the test also got renamed.
See #1565
The reason for auditing to not work on embedded fields is that EmbeddedRelationalPersistentProperty and BasicRelationalPersisntentProperty were not considered equal even when they represent the same field.
Note: the fix is somewhat hackish since it breaks the equals contract for EmbeddedRelationalPersistentProperty.
Closes#1694
See 1545e184ef
We now use one pooled `DataSource` for Oracle.
This should avoid problems with the TNS-Listener, which seems to have a problem with constantly opening and closing connections.
Closes#1815
Original pull request #1816
Embedded entities which contain a empty collection of values that aren't entities are now considered empty, if this collection is empty.
Closes#1737
Original pull request: #1812
In an aggregate A->B-Collection<C> a select gets executed for loading Collection<C>.
That select used the wrong ID when B had an ID with the same name as A.
This is now fixed.
Closes#1802
Original pull request: #1810
Let the AggregateReference converters now receive also custom converters as delegates.
Remove the ArrayToObjectConverter which just uses the first element of the array from the DefaultConversion service.
This does NOT solve the underlying problem, of having two DefaultConversionServices at work.
One is in the store conversion, one constructed in the AbstractRelationalConverter.
Although it looks like they get merged, the former contains converters, using that ConversionService as a delegate.
Attempts were made to move AggregateReferenceConverters out of the store converters and just register them directly,
but then no custom read/write targets are detected, leading to failed conversions.
The same problem prevents a registration in CustomConversions as a Function<ConversionService, GenericConverter> or similar, which would allow late registration.
The problem here is that custom read/write targets require the function to get evaluated, before custom read/write targets can be determined.
Closes#1750
Original pull request: #1785
createPersistentEntity(..) effectively only calls the overriden method.
It therefore can be deleted.
Remove error message no longer used.
Original pull request #1783
Introduce caching for configured RowMapper/ResultSetExtractor.
We now create RowMapper/ResultSetExtractor instances only once if they are considered static configuration.
A configured RowMapper ref/class is always static.
A configured ResultSetExtractor ref/class is static when the extractor does not accept a RowMapper or if the RowMapper is configured.
Default mappers or projection-specific ones require ResultSetExtractor recreation of the ResultSetExtractor is configured as Class.
Reuse TypeInformation as much as possible to avoid Class -> TypeInformation conversion.
Introduce LRU cache for DefaultAggregatePath to avoid PersistentPropertyPath lookups.
Introduce best-effort quoted cache for SqlIdentifier to avoid excessive string object creation.
Closes#1721
Original pull request #1722
When the child of a one-to-one relationship has an id, the value for that id gets read in the wrong way.
We get the column name for that id use that to access the value in the RowDocument.
This results in either no value at all being found or even worse, the value of a root entity with a property of same name being accessed.
This is fixed by using the full AggregatePath instead of just the property for accessing that value.
Closes#1684
Original pull request: #1775
Construction of the back reference assumed that the table holding the parent of the foreign key is the actual parent property.
This is now corrected by using the correct API to identify the ancestor which holds the id.
Closes: #1692
Original pull request: #1773