Commit Graph

599 Commits

Author SHA1 Message Date
Jens Schauder
fd66677fcb 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:21:13 +02:00
Paul Jones
4d4d9b5106 Add unit tests to verify DTO projection with AggregationReference.
Closes #1759
2024-06-10 15:16:34 +02:00
Mark Paluch
24a1ec823c 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:10 +02:00
Jens Schauder
e9b4ce3b68 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:10 +02:00
Mark Paluch
a4874dafff Upgrade to SQL Server 2022-latest.
See #1768
2024-05-23 08:48:33 +02:00
Mark Paluch
ffe036fdec Prepare next development iteration.
See #1768
2024-05-17 11:51:48 +02:00
Mark Paluch
1516d681d3 Release version 3.3 GA (2024.0.0).
See #1768
2024-05-17 11:49:25 +02:00
Mark Paluch
121d3723d6 Polishing.
Reduce test element visibility.

See #1750
Original pull request: #1785
2024-05-15 14:57:00 +02:00
Mark Paluch
3224b49117 Move AggregateReference converter registration into MappingJdbcConverter.
See #1750
Original pull request: #1785
2024-05-15 14:57:00 +02:00
Jens Schauder
08710d8e16 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:58 +02:00
Paul-Christian Volkmer
6ae53f5577 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:12:54 +02:00
Jens Schauder
21e8d9a4fa 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:16:27 +02:00
Jens Schauder
dafe448408 Polishing.
Add author tags.

See #1721
Original pull request #1722
2024-04-23 12:05:23 +02:00
Mark Paluch
49ddface0b 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:05:23 +02:00
Jens Schauder
8a94345a7a 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:28:07 +02:00
Jens Schauder
30e4ddd2e6 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:26:50 +02:00
Mark Paluch
58d2e92327 Prepare next development iteration.
See #1754
2024-04-12 10:52:59 +02:00
Mark Paluch
39d130c092 Release version 3.3 RC1 (2024.0.0).
See #1754
2024-04-12 10:50:42 +02:00
Mark Paluch
ae272e2a1e Align OffsetScrolling to zero-based indexes.
Closes #1764
2024-04-10 16:11:58 +02:00
Mark Paluch
2561b1e44c Prepare next development iteration.
See #1742
2024-03-15 11:09:58 +01:00
Mark Paluch
a87df99a20 Release version 3.3 M2 (2024.0.0).
See #1742
2024-03-15 11:07:32 +01:00
Jens Schauder
1600740fb7 Polishing.
Code formatting.
Adding author tags.
Added test for jdbc.
Fixed typo.

See #1744
Original pull request #1745
2024-03-13 09:43:45 +01:00
七夜
4a787171e3 Support conversion of elements in NOT_IN clause.
Closes #1744
Original pull request #1745
2024-03-13 09:43:44 +01:00
Christoph Strobl
3721876951 Prepare next development iteration.
See #1672
2024-02-16 14:41:24 +01:00
Christoph Strobl
08a9b5ae74 Release version 3.3 M1 (2024.0.0).
See #1672
2024-02-16 14:37:38 +01:00
Mark Paluch
7ac5c6601b Add support for ValueExpression.
Closes #1738
2024-02-12 16:12:24 +01:00
Mark Paluch
fbc3bf09e1 Extend license header copyright years to 2024.
See #1709
2024-01-02 14:42:28 +01:00
Mark Paluch
95d3b63b10 Polishing.
Remove duplicate and unused code.

See #1695
2023-12-14 08:14:01 +01:00
Mark Paluch
04bf61598e Wrap associations in EmbeddedRelationalPersistentEntity.
We now also wrap associations to ensure embedded prefix propagation.

Closes #1695
2023-12-14 08:14:00 +01:00
Jens Schauder
e7558fa791 Fix loading of nested embedded entities.
Closes #1676
Original pull request: #1685
2023-12-13 14:25:30 +01:00
Mark Paluch
cc43be8d02 Adopt RelationalParameters and RelationalParameter to reflect the actual parameter type when using generics.
Closes #1691
2023-12-08 12:02:22 +01:00
Mark Paluch
343569bae0 Create PartTree against the domain type.
We now derive queries against the domain type and no longer using the result type to ensure query mapping and query creation against the domain type.

Closes #1688
2023-12-05 15:09:17 +01:00
Jens Schauder
152fe93bfc Nested tests now get properly executed.
See 9a00e62fe7
See #1681
2023-12-04 12:19:52 +01:00
Jens Schauder
9a00e62fe7 Properly delegate method calls for EscapingParameterSource.
Closes #1681
See #1682
2023-12-01 15:55:47 +01:00
Mark Paluch
7d59397968 Reuse TypeInformation during PersistentPropertyPath and PersistentEntity lookups.
We now avoid Class -> TypeInformation conversion if we already have TypeInformation at hand.

Closes #1679
2023-11-29 09:47:57 +01:00
Jens Schauder
5342e02b8d Polishing.
Removed tests for circular references since they are not supported by Spring Data Relational.

Closes #1599
See #756, #1600
Original pull request #1629
2023-11-24 13:28:55 +01:00
Evgenii Koba
9136d86ae1 Add support for foreign keys in schema generation within aggregates.
Closes #1599
See #756, #1600
Original pull request #1629
2023-11-24 13:26:04 +01:00
Jens Schauder
e2a7508adc Switch to Testcontainers Oracle Free.
Timeout increased from the default because that cause problems on CI.
Brought SD JDBC now uses `ojdbc11` as R2DBC.

Closes #1665
Original pull request #1668
2023-11-20 15:31:36 +01:00
Mark Paluch
126781f2f8 Polishing.
Reformat code.

See #1666
Original pull request: #1667
2023-11-20 14:46:19 +01:00
Jens Schauder
30961bfa50 Support for Id generation in Oracle using quoted identifiers.
The latest Oracle JDBC driver properly supports returning of generated ids,
both in batches and for quoted identifiers.

This allows us to now support this feature.

Closes #1666
Original pull request: #1667
2023-11-20 14:44:08 +01:00
Mark Paluch
654daf1237 Prepare next development iteration.
See #1642
2023-11-17 14:33:25 +01:00
Mark Paluch
fe6d599d8b Release version 3.2 GA (2023.1.0).
See #1642
2023-11-17 14:29:59 +01:00
Jens Schauder
42e786ca78 Fix Oracle database setup script.
Changed BIGINT to NUMBER.

See #1656
Original pull request #1663
2023-11-16 20:38:49 +01:00
Jens Schauder
15bb8d1eef Properly convert Map keys.
Keys of maps now get properly converted.
Among others this enables the use of enums as keys.

Closes #1656
Original pull request: #1663
2023-11-16 10:42:15 +01:00
Mark Paluch
5312731623 Reject Limit parameter using String-based queries.
Document limitations, add test cases for derived queries.

Closes #1654
2023-11-02 09:26:43 +01:00
Jens Schauder
6736d8334e Add conversion capabilities to the entity instantiator.
Closes #1646
2023-10-17 16:54:11 +02:00
Jens Schauder
3c7cbcfeeb Polishing.
Original pull request #1636
2023-10-16 11:01:23 +02:00
Simon Verhoeven
4062237e04 Update readme.
Cleanup.

Original pull request #1636
2023-10-16 11:01:15 +02:00
John Blum
b7855d010f Prepare next development iteration.
See #1614
2023-10-13 08:51:59 -07:00
John Blum
74ae9af708 Release version 3.2 RC1 (2023.1.0).
See #1614
2023-10-13 08:44:26 -07:00