629 Commits

Author SHA1 Message Date
Mark Paluch
5d38339cdd Prepare next development iteration.
See #1914
2024-11-15 10:23:54 +01:00
Mark Paluch
82d43ca8bd Release version 3.2.12 (2023.1.12).
See #1914
2024-11-15 10:21:37 +01:00
Jens Schauder
7274668d2d Fix SQL generation for query with sorting.
Closes #1919
2024-10-25 15:26:01 +02:00
Mark Paluch
19c983f2f7 Polishing.
Eliminate potential NoSuchElementException from unchecked Optional.get usage. Simplify stream. Return Staged value, fix Nullability annotations.

See #1907
Original pull request: #1920
2024-10-25 14:57:45 +02:00
Jens Schauder
75073429ef Fix id setting for partial updates of collections of immutable types.
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
2024-10-25 14:57:37 +02:00
Jens Schauder
9b9b1c179a Upgrade MS SqlServer version to 2022-latest.
We upgrade of MS SqlServer used for Testcontainers based integration tests.

Closes #1917
2024-10-21 14:15:00 +02:00
Mark Paluch
33ad7dde6b Prepare next development iteration.
See #1881
2024-10-18 10:17:02 +02:00
Mark Paluch
6bf2c54e1e Release version 3.2.11 (2023.1.11).
See #1881
2024-10-18 10:14:33 +02:00
Jens Schauder
7d49d54979 Removes superfluous EnabledOnDatabase.
Closes #1902
2024-10-01 14:03:38 +02:00
Tran Ngoc Nhan
c4919396af Minor refactoring.
Original pull request #1895
2024-09-24 09:11:05 +02:00
Tran Ngoc Nhan
9a7f209a94 Polishing.
Original pull request #1894
2024-09-23 09:22:24 +02:00
Jens Schauder
4c898c19e4 Prepare next development iteration.
See #1857
2024-09-13 10:52:59 +02:00
Jens Schauder
67665a1114 Release version 3.2.10 (2023.1.10).
See #1857
2024-09-13 10:50:09 +02:00
arefbehboudi
7b31620e4f Refactor code with instanceof pattern variable.
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
2024-08-30 10:20:54 +02:00
Jens Schauder
2bc4cc64bf Avoid selection of duplicate columns.
Closes #1865
2024-08-29 12:39:46 +02:00
Jens Schauder
a11d16538b Prepare next development iteration.
See #1836
2024-08-16 09:01:33 +02:00
Jens Schauder
65aa2138bd Release version 3.2.9 (2023.1.9).
See #1836
2024-08-16 08:58:34 +02:00
Mark Paluch
781e493498 Polishing.
Correctly assign SQL type for tuples.

See #1323
Original pull request: #1838
2024-07-23 13:43:00 +02:00
Mark Paluch
ae75b1dcea Polishing.
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
2024-07-22 15:05:36 +02:00
Jens Schauder
11be4cf042 Allow passing of tuples to repository query methods.
Closes #1323
Original pull request: #1838
2024-07-22 15:05:36 +02:00
Jens Schauder
a28f471be1 Run test only on HsqlDb.
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
2024-07-17 11:26:57 +02:00
Jens Schauder
9214f9abb2 Consider sanitised names when copying parameter sources.
Closes #1565
2024-07-17 11:26:57 +02:00
Jens Schauder
5916e9f473 Polishing.
Make test methods package private.

See #1565
2024-07-17 11:26:57 +02:00
Jens Schauder
aef780e037 Replaced all usage of catalog with schema.
Catalog was used by mistake.
Spring Data JDBC has no support for multiple catalogs, only for multiple schema.

Closes #1729
2024-07-16 10:24:37 +02:00
Jens Schauder
153e7e12c6 Prepare next development iteration.
See #1817
2024-07-12 13:36:34 +02:00
Jens Schauder
bbd28a616d Release version 3.2.8 (2023.1.8).
See #1817
2024-07-12 13:33:06 +02:00
Jens Schauder
9ce9694dee Fix regression of loading empty arrays.
Closes #1826
See #1812
2024-07-02 15:15:27 +02:00
Jens Schauder
448b6fd617 Use first column in case of duplicate columns.
Also, fallback on column names when label is not present.

See #1680
Original pull request #1825
2024-07-01 13:36:23 +02:00
Jens Schauder
eaaf1257ba Reestablish warning on duplicate column in query.
Closes #1680
Original pull request #1825
2024-07-01 13:36:23 +02:00
Jens Schauder
6f74c0f672 Fix Auditing for embedded fields.
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
2024-06-27 10:42:42 +02:00
Mark Paluch
46bded807e Prepare next development iteration.
See #1788
2024-06-14 10:06:43 +02:00
Mark Paluch
c427894d11 Release version 3.2.7 (2023.1.7).
See #1788
2024-06-14 10:04:22 +02:00
Jens Schauder
2f1d2e81b1 Create one connection pool for Oracle.
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
2024-06-14 09:20:18 +02:00
Jens Schauder
da6404860d Refine embeddable emptiness checks to consider whether the collection holds entities.
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
2024-06-11 10:22:52 +02:00
Paul Jones
b76bd37799 Add unit tests to verify DTO projection with AggregationReference.
Closes #1759
2024-06-10 15:16:38 +02:00
Mark Paluch
6933f411e5 Polishing.
Simplify code. Remove redundant calls.

Reformat code, remove trailing whitespaces, remove duplicate tests.

See #1802
Original pull request: #1810
2024-06-10 11:15:39 +02:00
Jens Schauder
040da7cea8 Fix usage of wrong id value in related selects.
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
2024-06-10 11:15:39 +02:00
Mark Paluch
01dcae8c85 Prepare next development iteration.
See #1767
2024-05-17 11:24:37 +02:00
Mark Paluch
f676fd0ed7 Release version 3.2.6 (2023.1.6).
See #1767
2024-05-17 11:22:24 +02:00
Mark Paluch
61c6fcfd39 Polishing.
Reduce test element visibility.

See #1750
Original pull request: #1785
2024-05-15 14:56:52 +02:00
Mark Paluch
9e8e3ce64e Move AggregateReference converter registration into MappingJdbcConverter.
See #1750
Original pull request: #1785
2024-05-15 14:56:52 +02:00
Jens Schauder
284509a40f Reuse custom converters from AggregateReferenceConverters.
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
2024-05-15 14:56:47 +02:00
Paul-Christian Volkmer
a03441598e Remove redundant code
createPersistentEntity(..) effectively only calls the overriden method.
It therefore can be deleted.

Remove error message no longer used.

Original pull request #1783
2024-04-30 09:16:39 +02:00
Jens Schauder
792d773cbd Fix broken merge.
See #1721
Original pull request #1722
2024-04-24 15:24:59 +02:00
Jens Schauder
ecdf7039ed Remove check for constructor parameter names.
For Kotlin constructors and possibly others parameters maybe unnamed and still work with our infrastructure.

Closes #1762
2024-04-24 12:18:58 +02:00
Jens Schauder
13ed4baf45 Polishing.
Add author tags.

See #1721
Original pull request #1722
2024-04-23 12:04:43 +02:00
Mark Paluch
f50609f7b1 Performance improvements.
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
2024-04-23 12:04:43 +02:00
Jens Schauder
9b41c1d236 Fix access of root property instead of child property.
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
2024-04-22 09:29:59 +02:00
Jens Schauder
b22ccad36d Fix loading of 2nd level collections.
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
2024-04-18 10:28:39 +02:00
Mark Paluch
93fe8604ff Prepare next development iteration.
See #1753
2024-04-12 10:17:28 +02:00