Commit Graph

1871 Commits

Author SHA1 Message Date
Julia Lee 2b1d2c834c Prepare next development iteration.
See #1562
2023-08-18 08:59:38 -04:00
Julia Lee cb7b4679c5 Release version 3.2 M2 (2023.1.0).
See #1562
3.2.0-M2
2023-08-18 08:50:33 -04:00
Julia Lee 0c39621c73 Prepare 3.2 M2 (2023.1.0).
See #1562
2023-08-18 08:49:41 -04:00
Mark Paluch 518e49d81d Introduce RowDocumentExtractor.
Transform the tabular structure into a graph of RowDocument associated with nested documents and lists.

Add container license acceptance for updated container images.

See #1446
See #1450
See #1445
Original pull request: #1572
2023-08-15 10:16:41 +02:00
Mark Paluch d9b548815c Polishing.
Extract Single Query Loading branching to SingleQueryFallbackDataAccessStrategy. Inline AggregateReaderFactory into SingleQueryDataAccessStrategy. Move CachingSqlGenerator to AggregateReader as caching root.

Introduce DataAccessStrategyFactory to encapsulate configuration.

Fix Javadoc tag ordering. Remove superfluous MappingContext parameters when Converter is available. Simplify code. Reformat code.

Reorder Functions methods. Tweak Javadoc, move composite function into SingleQuerySqlGenerator.

See #1446
See #1450
See #1445
Original pull request: #1572
2023-08-15 10:16:41 +02:00
Jens Schauder 93821f5f42 Enable Single Query Loading for simple aggregates.
Single Query Loading loads as the name suggests complete aggregates using a single select.
While the ultimate goal is to support this for all aggregates, this commit enables it only for simple aggregate and also only for some operations.
A simple aggregate is an aggregate that only reference up to one other entity and does not have embedded entities.
The supported operations are those available via `CrudRepository`: `findAll`, `findById`, and `findAllByIds`.

Single Query Loading does NOT work with the supported in memory databases H2 and HSQLDB, since these do not properly support windowing functions, which are essential for Single Query Loading.

To turn on Single Query Loading call `RelationalMappingContext.setSingleQueryLoadingEnabled(true)`.

Closes #1446
See #1450
See #1445
Original pull request: #1572
2023-08-15 10:16:41 +02:00
Julia Lee dffde372f9 Update CI properties.
See #1562
2023-08-14 12:15:34 -04:00
Julia Lee fd66f3f0f2 Upgrade to Maven Wrapper 3.9.4.
See #1585
2023-08-14 08:53:30 -04:00
Christoph Strobl e9e21c5918 Update broken links in Javadoc.
Closes: #1578
2023-08-03 09:28:39 +02:00
Jens Schauder d00e928db5 Introduce AggregatePath.
AggregatePath replaces PersistentPropertyPathExtension.
It gets created and cached by the RelationalMappingContext, which should be more efficient and certainly looks nicer.

Closes #1525
Original pull request #1486
2023-07-21 17:39:17 +02:00
Mark Paluch 7d5bc1cbd9 After release cleanups.
See #1511
2023-07-14 14:57:13 +02:00
Mark Paluch 1ccaaf3cd5 Prepare next development iteration.
See #1511
2023-07-14 14:57:11 +02:00
Mark Paluch f6f4ad39a0 Release version 3.2 M1 (2023.1.0).
See #1511
3.2.0-M1
2023-07-14 14:53:19 +02:00
Mark Paluch 290fea4ae3 Prepare 3.2 M1 (2023.1.0).
See #1511
2023-07-14 14:52:14 +02:00
Mark Paluch 28adfe0c32 Upgrade to latest R2DBC drivers.
Closes #1559
2023-07-14 10:21:10 +02:00
Greg L. Turnquist de71874b9c Ensure Testcontainers works properly with MS SQL Server on CI.
See #1558.
2023-07-10 14:03:17 -05:00
Jens Schauder cf126d2d42 Remove lombok annotations.
Closes #1557
2023-07-10 14:57:19 +02:00
Mark Paluch 56ec491724 Fix tests after dependency upgrades.
See #1541
2023-07-04 14:39:23 +02:00
Jorge f3f34e593b Add CodeQL workflow.
Closes ##1543
2023-07-04 08:07:34 +02:00
Mark Paluch 1bb60682ce Update CI properties.
See #1511
2023-07-03 09:50:20 +02:00
Mark Paluch f90f42d1fe Upgrade to Maven Wrapper 3.9.3.
See #1553
2023-07-03 09:49:54 +02:00
Mark Paluch e2514a3454 Allow non-domain sort orders to be used with R2dbcQueryCreator.
Closes #1548
2023-06-30 10:42:55 +02:00
Mark Paluch f1ece358a1 Add test to verify empty enum collection behavior.
See #1544
2023-06-28 12:02:14 +02:00
Mark Paluch c55a54e613 Polishing.
See #1538
2023-06-15 09:17:46 +02:00
Jens Schauder 3cac9d1456 Updating Oracle version to Oracle Free 23.
The new image is configured as compatible with the old image, which it actually isn't.
The default database names are different, so we also set a database name that is different both from the one used by TestContainers as default and the one used by the Docker image.
If the TestContainers default is used the database is not found, because the image just creates the default one and the name doesn't mach.
If the Docker image default is used, the image creates its default database and then tries to create it again, which fails.

These workarounds may be removed once TestContainers properly supports the new image.

Closing #1528
2023-06-14 10:44:50 +02:00
Mark Paluch 121317fa97 Retrofit events for generics matching of ApplicationEvent subtypes with generic payload parameter.
Closes #1539
2023-06-13 16:33:42 +02:00
Jens Schauder 147634a915 Polishing.
See #1460
Original pull request #1521
2023-06-13 16:09:45 +02:00
Vincent Galloy fb97bfca97 Fix Enum[] type conversion.
Since 3.0.5, Enum[] type are detect as "UNKNOWN"

Closes #1460
Original Pull request #1521
2023-06-13 15:48:59 +02:00
Mark Paluch b07abd7afc Update event documentation to reflect the notification-only aspect of lifecycle events.
Closes #1538
2023-06-13 14:39:15 +02:00
Mark Paluch d87081e0b3 Upgrade to Maven Wrapper 3.9.2.
See #1537
2023-06-13 08:55:15 +02:00
Mark Paluch 9b2032d153 Replace JdbcRepositoryFactoryBean autowiring with RuntimeBeanReferences.
We now specify runtime bean references to qualify the desired mapping context type instead of using autowiring that can match the wrong mapping context.

Closes #1143
2023-06-08 15:40:41 +02:00
Mark Paluch 6b3819c6db Use snapshot and milestone repositories instead of libs-snapshot and libs-milestone.
Closes #1527
2023-06-06 09:59:33 +02:00
Mark Paluch dbbafb25eb Polishing.
Reorder dependencies.

See #756
2023-06-06 08:51:25 +02:00
Mark Paluch b35c7cb317 Add documentation.
See #756
Original pull request: #1520
2023-06-06 08:51:22 +02:00
Mark Paluch b2950bf133 Polishing.
Reformat code, switch to tabs. Accept property in DatabaseTypeMapping to provide more context to the type mapping component.

Rename LiquibaseChangeSetGenerator to …Writer as we're writing a changeset and computing the contents is a consequence of writing a changeset. Refine naming to express what we're actually doing.

Introduce setters for enhanced configuration of predicates. Reduce visibility of types to avoid unwanted public API where public access is not needed.

Remove usused code, move methods around for improved grouping of code.

Rename package to schema as the schema is being created and updated and not generated. Rename …Model classes to just their name as types are package-private and not visible externally. Refactor SchemaDiff to Java record.

Use different overloads to write schema changes to avoid LiquibaseException leaking into cases where no diff is being used. Introduce SchemaFilter to filter unwanted mapped entities.

Move code to JDBC module. Introduce comparator strategy to customize how table and column names are compared.

See #756
Original pull request: #1520
2023-06-06 08:51:19 +02:00
Kurt Niemi 5f4ef2ffcb Add support for schema creation using Liquibase.
We now support schema creation and schema migration by generating Liquibase changesets from mapped entities. We also support evolution of schema by comparing existing tables with mapped entities to compute differential changesets.

Closes #756
Original pull request: #1520
2023-06-06 08:51:16 +02:00
Mark Paluch b92586f8c0 Add expression support for @MappedCollection annotation.
See #1325
Original pull request: #1461
2023-05-31 16:00:17 +02:00
Kurt Niemi a73be5a829 Add SpEL support for @Table(schema=…).
Add SpEL support for schema property in `@Table` annotation

See #1325
Original pull request: #1461
2023-05-31 16:00:17 +02:00
Mark Paluch 549b807003 Polishing.
Reuse existing EvaluationContextProvider infrastructure and static parser/parser context instances. Parse expressions early. Update Javadoc to reflect SpEL support.

Reformat code to use tabs instead of spaces. Rename types for consistency. Rename SpelExpressionResultSanitizer to SqlIdentifierSanitizer to express its intended usage.

Eagerly initialize entities where applicable. Simplify code.

See #1325
Original pull request: #1461
2023-05-31 16:00:17 +02:00
Kurt Niemi 68a13fe12b Add SpEL support for @Table and @Column.
If SpEl expressions are specified in the `@Table` or `@Column` annotation, they will be evaluated and the output will be sanitized to prevent SQL Injections.

The default sanitization only allows digits, alphabetic characters, and _ character. (i.e. [0-9, a-z, A-Z, _])

Closes #1325
Original pull request: #1461
2023-05-31 16:00:17 +02:00
Mark Paluch 064b3d3da7 Move Projections documentation to the top level.
Closes #1515
2023-05-30 15:18:50 +02:00
George Papadopoulos ac80e51425 Use awaitSingle operator instead of awaitFirst.
Operators `awaitFirstXxx` are going to be deprecated. Also, awaitFirst operator has no value on Mono types.

Closes: #1355

Signed-off-by: George Papadopoulos <george.719pap@gmail.com>
2023-05-26 15:18:11 +02:00
Greg L. Turnquist 2b84f7d63b Use Harbor Proxy service on CI.
When run on CI servers, leverage an internal proxy service using Testcontainers ability to plugin a custom ImageNameSubstitor.

See #1518
Original Pull Request: #1516
2023-05-17 10:23:20 -05:00
Mark Paluch bc70b0d435 Polishing.
Reformat code.

See #1512
Original pull request: #1513
2023-05-17 10:52:52 +02:00
Jens Schauder e0a0bb2b5d Do not prefix unsafe orer by expressions with table prefix.
Such expressions now get passed on unchanged.

This also deprecates org.springframework.data.r2dbc.query.QueryMapper.getMappedObject(Sort, RelationalPersistentEntity<?>).
It was only used in tests and translates an Order into another Order, which sounds wrong.

Closes #1512
Original pull request: #1513
2023-05-17 10:52:48 +02:00
Christoph Strobl 9acf426ff7 After release cleanups.
See #1498
2023-05-12 14:18:54 +02:00
Christoph Strobl 999124763d Prepare next development iteration.
See #1498
2023-05-12 14:18:52 +02:00
Christoph Strobl 69ce8b7edf Release version 3.1 GA (2023.0.0).
See #1498
3.1.0
2023-05-12 14:14:39 +02:00
Christoph Strobl 370b757a2c Prepare 3.1 GA (2023.0.0).
See #1498
2023-05-12 14:14:09 +02:00
Jens Schauder a26557e76b Introduce SqlSort.
SqlSort allows the specification of unsafe order-by-expressions.
Order-by-expressions that are not declared unsafe are only accepted when they
either match a property or consist only of digits, letters, underscore, dot, or parentheses.

 Closes #1507
2023-05-12 10:54:17 +02:00