Commit Graph

1851 Commits

Author SHA1 Message Date
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
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
Oleg Oshmyan
15980174af Remove unnecessary reification from Kotlin R2DBC extensions.
This allows calling the extensions from generic code that has erased types.

Original pull request #1496
2023-04-25 09:32:04 +02:00
Greg L. Turnquist
dca880c412 After release cleanups.
See #1456
2023-04-14 12:00:05 -05:00
Greg L. Turnquist
ffefc99e2e Prepare next development iteration.
See #1456
2023-04-14 11:59:59 -05:00
Greg L. Turnquist
4fd5d6c81d Release version 3.1 RC1 (2023.0.0).
See #1456
2023-04-14 11:54:02 -05:00
Greg L. Turnquist
6fc4243327 Prepare 3.1 RC1 (2023.0.0).
See #1456
2023-04-14 11:53:26 -05:00
Mark Paluch
b945060753 Polishing.
Move off deprecated getRequiredLeafProperty() method in other places.

See #1489
2023-04-12 11:09:12 +02:00
Mikhail2048
e106b2099b Migrated off deprecated PropertyPath methods.
Closes #1489
2023-04-12 11:08:54 +02:00
Mark Paluch
44f77215bf Reinstate integration tests for R2DBC MySQL.
Closes #1475
2023-04-11 10:50:40 +02:00
Jens Schauder
21428af950 Remove snapshot plugin repository from the pom.xml.
Closes #1485
2023-04-06 17:05:44 +02:00
Mark Paluch
009ad3e7f5 Upgrade to Maven Wrapper 3.9.1.
See #1482
2023-04-06 16:16:39 +02:00
Greg L. Turnquist
c1ada2c3bd Polishing. 2023-04-04 16:17:32 -05:00
Greg L. Turnquist
ccd7f19073 Test against Java 20 on CI.
See #1462.
2023-04-04 16:16:27 -05:00
Oliver Drotbohm
d68605b6d8 Adapt to API changes in Spring Data Common's PersistentPropertyPathAccessor.
Fixes #1477.
Related ticket: spring-projects/spring-data-commons#2813.
2023-04-04 11:45:38 +02:00
Jens Schauder
2ed2d2e1f7 Upgrade DB2 JDBC driver to 11.5.8.0.
Closes #1471
2023-03-30 16:29:23 +02:00
Jens Schauder
19b1268cb1 Upgrade HsqlDb JDBC driver to 2.7.1.
Closes #1470
2023-03-30 16:27:58 +02:00
Jens Schauder
7c2c71342c Upgrade Maria DB JDBC driver to 3.1.3.
Closes #1469
2023-03-30 16:27:09 +02:00
Jens Schauder
eca8c233ab Upgrade MS Sql Server JDBC driver to 12.2.0.jre11.
Closes #1468
2023-03-30 16:26:16 +02:00
Jens Schauder
7d90092fb9 Upgrade MySql JDBC driver to 8.0.32.
Closes #1467
2023-03-30 16:25:10 +02:00
Jens Schauder
2c615b4207 Upgrade Postgres JDBC driver to 42.6.0.
Closes #1466
2023-03-30 16:24:07 +02:00
Jens Schauder
b5f7fbd397 Upgrade Oracle JDBC driver to 19.18.0.0.
Closes #1465
2023-03-30 16:23:17 +02:00