Commit Graph

506 Commits

Author SHA1 Message Date
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
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
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
dbbafb25eb Polishing.
Reorder dependencies.

See #756
2023-06-06 08:51:25 +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
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
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
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
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
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
Mark Paluch
b945060753 Polishing.
Move off deprecated getRequiredLeafProperty() method in other places.

See #1489
2023-04-12 11:09:12 +02: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
e78f7df53d Polishing.
Original pull request #1209
See #1110
2023-03-23 15:43:54 +01:00
Mikhail2048
d893259d4e Remove unnecessary parameters after moving of getReference(Identifier Processing).
Original pull request #1209
See #1110
2023-03-23 15:41:15 +01:00
Jens Schauder
58a67ceb2a Polishing.
Added `@author` tags.
Undo the change in behaviour of getReference(IdentifierProcessing).

See #1110
Original pull request #1458
2023-03-23 10:48:31 +01:00
Kurt Niemi
18eda61f15 Deprecate redundant getReference(IdentifierProcessing) method.
Closes #1110
Original pull request #1458
2023-03-23 10:45:49 +01:00
Christoph Strobl
0bfed4042d Prepare next development iteration.
See #1430
2023-03-20 15:05:34 +01:00
Christoph Strobl
3ff271f100 Release version 3.1 M3 (2023.0.0).
See #1430
2023-03-20 15:01:48 +01:00
Mark Paluch
09189a4c41 Polishing.
Simplify TypeInformation creation from a MethodParameter.

Original pull request: #1356
See #1343
2023-03-15 17:02:10 +01:00
Jens Schauder
d1e039a387 Convert only contents of collections using StringBasedJdbcQuery.
Contents of Iterables that aren't collections will not be converted individually.

Closes #1343
Original pull request: #1356
2023-03-15 17:02:10 +01:00
Jens Schauder
6855b9bd25 Polishing.
Simplify test.

Original pull request: #1356
See #1343
2023-03-15 17:02:10 +01:00
Mark Paluch
637d06a9a0 Apply custom converter for Collection-like values in queries.
We now apply converters only for Collection-like values and no longer to Iterable types.

Closes #1452
2023-03-15 16:46:01 +01:00
Jens Schauder
c7e7f3eced Reenable DependencyTests.
Closes #1441
2023-03-03 12:27:49 +01:00
Christoph Strobl
eac53196b6 Prepare next development iteration.
See #1429
2023-02-17 14:25:47 +01:00
Christoph Strobl
0cca3e817e Release version 3.1 M2 (2023.0.0).
See #1429
2023-02-17 14:22:31 +01:00
Christoph Strobl
1290cff7c0 Prepare next development iteration.
See #1389
2023-02-17 13:31:53 +01:00
Christoph Strobl
8f4945c402 Release version 3.1 M1 (2023.0.0).
See #1389
2023-02-17 13:27:50 +01:00
Mark Paluch
68781c9ab3 Adopt to Mockito 5.1 changes.
Closes #1424
2023-02-14 10:34:57 +01:00
Jens Schauder
0b85b6f216 Polishing.
Simplified use of queryMethod in the different JdbcQuery classes.
Improved method names.
Added author tags.
Code formatting.
Corrected HTML in JavaDoc.

Originial pull request #1423
2023-02-06 20:45:26 +01:00
Mikhail2048
468f94b312 Avoid superfluous creation of RowMappers.
For modifying queries RowMappers get now longer created.
Improved documentation for `@Query` annotation.

Original pull request #1423
2023-02-06 20:43:05 +01:00
Jens Schauder
c5c60dadde Polishing.
Original pull request #1403
See #1286
2023-01-30 13:57:41 +01:00
Mikhail2048
8eb80af044 Support of embedded properties in Sort.by.
Original pull request #1403
Closes #1286
2023-01-30 13:57:40 +01:00
Jens Schauder
f6de0f3b20 Fixed Postgres scripts.
See #1406
See #1405
2023-01-26 11:39:49 +01:00
Mark Paluch
82bc225b0b Polishing.
Simplify sanitizer. Add unit test.

See #1405
See #1406
Original pull request #1415
2023-01-26 09:40:40 +01:00
Jens Schauder
427fc4d83b SqlIdentifierParameterSource now sanitizes identifier names.
Closes #1405
See #1406
Original pull request #1415
2023-01-26 09:40:28 +01:00
Mikhail2048
b8e8c996b6 Integration test added to demonstrate behavior when column names contain characters illegal for bind parameters.
See #1405
Related pull request #1406
Original pull request #1415
2023-01-26 09:39:50 +01:00
Jens Schauder
e325c0152b Allow empty Iterable arguments in JdbcAggregateTemplate again.
This also affects repositories since they delegate to the template.

Closes #1401
2023-01-03 09:36:21 +01:00
Mark Paluch
3045225207 Extend license header copyright years to 2023.
See #1400
2023-01-02 09:53:43 +01:00
Jens Schauder
fb9a4f363d Polishing.
Original pull request #1396
See #1395
2022-12-22 15:58:43 +01:00
mhyeon-lee
d10be27485 Add insertAll and updateAll for JdbcAggregateOperations.
Original pull request #1396
Closes #1395
2022-12-22 15:58:42 +01:00
Jens Schauder
e590dceede Polishing.
Original pull request 1384
See #833
2022-11-29 14:46:44 +01:00
Viktor Ardelean
09f9da5128 Improved error message on missing back reference.
Closes #833
Original pull request 1384
2022-11-29 14:26:40 +01:00
Mark Paluch
8ed08e5e8e Prepare next development iteration.
See #1361
2022-11-18 14:30:19 +01:00
Mark Paluch
c244985b56 Release version 3.0 GA (2022.0.0).
See #1361
2022-11-18 14:26:23 +01:00