Commit Graph

298 Commits

Author SHA1 Message Date
Stephen Cohen
4da92bdc7c #407 - Add ReactiveSortingRepository support.
Implements ReactiveSortingRepository on SimpleR2dbcRepository. Also changed R2dbcRepository to extend ReactiveSortingRepository and updated comments where it felt reasonable.

Added a single unit test for the new method, and changed the base interface of LegoSetRepository in AbstractR2dbcRepositoryIntegrationTests for integration testing purposes.

Clarify documentation on reactive repository base interfaces

Adds some language calling out ReactiveSortingRepository and fixes consistency between related examples.

Original pull request: #408.
2020-07-23 10:42:03 +02:00
Mark Paluch
d51586890c #406 - Polishing.
Fix annotation name in Javadoc.
2020-07-23 10:34:36 +02:00
Mark Paluch
0bd6f8a431 #406 - Allow configuring R2dbcEntityOperations bean reference in EnableR2dbcRepositories.
We now accept a bean reference to R2dbcEntityOperations so that a single application can scan for repositories that use different dialects/database systems.
2020-07-23 10:33:01 +02:00
Jens Schauder
b605daa0e8 #215 - Polishing.
Formatting.

Original pull request: #397.
2020-07-22 14:32:35 +02:00
Mark Paluch
4140981159 #215 - Polishing.
Reintroduce deprecated setBeanFactory(…) method.
Extract code into methods.
Ensure that versioned entities are eagerly initialized to allow retries.

Original pull request: #397.
2020-07-22 14:32:35 +02:00
Mark Paluch
a70bd0a3d3 #215 - Polishing.
Simplify what's new section.

Original pull request: #397.
2020-07-22 14:32:34 +02:00
Mark Paluch
bc698c3885 #215 - Add support for EntityCallbacks.
We now support entity callbacks for:

* AfterConvertCallback
* BeforeConvertCallback
* BeforeSaveCallback
* AfterSaveCallback

through R2dbcEntityTemplate.

Original pull request: #397.
2020-07-22 14:32:34 +02:00
Jens Schauder
06cc4e2701 #373 - Polishing.
Using soft assertions for more expressive test failures.

Original pull request: #376.
2020-07-22 14:14:31 +02:00
Mark Paluch
9e116269fe #373 - Extract test into ExpressionQueryUnitTests.
Original pull request: #376.
2020-07-22 14:14:24 +02:00
Mark Paluch
687142e134 #373 - Use SpelQueryContext for expression query parsing.
We now use SpelQueryContext and SpelExtractor for analysis and rewrite of queries using SpEL.

Original pull request: #376.
2020-07-22 14:13:51 +02:00
Mark Paluch
7e693019a4 #387 - Updated changelog. 2020-07-22 10:37:56 +02:00
Mark Paluch
729222c763 #390 - Polishing.
Add author tags and ticket references to tests.
2020-07-14 15:21:21 +02:00
Zsombor Gegesy
748c5ba993 #390 - Insert should work without giving any explicit assignment/variables.
DatabaseClient.insert() can now persist objects that consist only of an id.
2020-07-14 15:21:20 +02:00
Mark Paluch
7b676a93ce #398 - Upgrade to MySQL JDBC connector 8.0.21. 2020-07-14 15:15:02 +02:00
Mark Paluch
682b6ffa75 #349 - Polishing.
Remove manual query for query derivation with SQL Server.
2020-07-07 14:36:45 +02:00
Mark Paluch
ff0ba44175 #367 - Prepare 1.2 M1 (2020.0.0). 2020-06-25 11:48:19 +02:00
Mark Paluch
d98e29da2c #367 - Updated changelog. 2020-06-25 11:48:12 +02:00
Mark Paluch
8142460c9b #366 - Updated changelog. 2020-06-10 14:30:55 +02:00
Mark Paluch
9485c52247 #383 - Polishing.
Use more concise assertions.
2020-06-09 15:26:44 +02:00
Mark Paluch
58708779da #383 - Fix Criteria mapping when composing a group from top-level criteria.
Using Criteria.from(…) with multiple Criteria objects now uses properly AND combination along with group nesting to render a correct criteria. Previously, the INITIAL combinator in groups caused a mapping exception.
2020-06-09 15:26:44 +02:00
Mark Paluch
bd106a95b0 #384 - Polishing.
Fix typo in exception message.
2020-06-09 11:27:52 +02:00
Mark Paluch
594df7ac17 #384 - Fix return type detection for suspended Kotlin methods.
See DATACMNS-1738 for further reference.
2020-06-09 11:27:52 +02:00
Mark Paluch
43c473cbf1 #375 - Improve documentation for supported databases.
Add explicit note about dialects.
2020-05-26 15:41:32 +02:00
Mark Paluch
e71c2b9b71 #369 - Polishing.
Remove unused code.
2020-05-22 09:25:08 +02:00
Mark Paluch
02c9a87078 #369 - Fall back to column name in QueryMapper if path expression maps into simple type property.
We now fall back to the column name when resolving a property path expression that maps into a simple-typed property. PropertyPath.from(…) fails internally as it attempts to look up a simple type from the MappingContext and this fails for primitive and simple types.
2020-05-22 09:16:49 +02:00
Mark Paluch
6cf2834a23 #207 - Skip converter registrations for JSR-310 to java.util.Date.
We now prevent converter registrations that enforce a conversion from JSR-310 types to java.util.Date. R2DBC drivers use natively JSR-310 types and some of them don't implement java.util.Date at all.
2020-05-15 11:50:24 +02:00
Mark Paluch
7a1e39517f #357 - Prepare 1.1 GA (Neumann). 2020-05-12 12:27:59 +02:00
Mark Paluch
e3f56b4a1b #357 - Updated changelog. 2020-05-12 12:27:53 +02:00
Mark Paluch
af7dea07ad #329 - Translate driver exceptions in R2dbcTransactionManager. 2020-05-11 16:58:23 +02:00
Mark Paluch
53b84e6a08 #365 - Fix immutable versioned object usage.
We now use the proper object instance when constructing statements for insert/update of versioned entities. Previously, we created a new instance that is associated with the incremented version number but we did not reuse that instance so the version increment remained invisible.
2020-05-11 15:57:51 +02:00
Mark Paluch
6f94ace85a #363 - Polishing.
Fix failing tests.
2020-05-11 15:52:06 +02:00
Jens Schauder
15c64a4ee1 #363 - Polishing.
Added an integration test and tweaked the conversions to make it succeed.
The converter now does not rely on the driver to do the conversion anymore.

Original pull request: #360.
2020-05-11 11:35:30 +02:00
mhyeon-lee
d004bc0dd9 #363 - Count projection support for derived queries.
Original pull request: #360.
2020-05-11 11:27:44 +02:00
Jens Schauder
919d8c663f #364 - Add lock() to Dialect implementation for tests. 2020-05-07 09:39:50 +02:00
Mark Paluch
1ec0d8151c #331 - Prepare 1.1 RC2 (Neumann). 2020-04-28 15:03:33 +02:00
Mark Paluch
9b19f61b98 #331 - Updated changelog. 2020-04-28 15:03:28 +02:00
Jens Schauder
94f94c6ba0 #93 - Polishing.
Formatting.
Added issue to test comments.

Removed the test for presence of the id in case of a potential optimistic locking exception.
A deleted row is also a case of a concurrent modification and therefore should trigger the OptimisticLockingException.

Original pull request: #314.
2020-04-24 10:48:10 +02:00
orange-buffalo
8e6797dd04 #93 - Adding support for optimistic locking based on @Version column.
Original pull request: #314.
2020-04-24 10:47:17 +02:00
Mark Paluch
75e2ba3ede #354 - Polishing.
Add author tags. Reformat code.

Original pull request: #355.
2020-04-23 14:29:39 +02:00
Louis Morgan
bf19cb36a4 #354 - Allow saving an entity with a read-only collection-like property.
Previously a NullPointerException would be thrown.

Original pull request: #355.
2020-04-23 14:29:26 +02:00
Mark Paluch
8c0d01ae8c #344 - Polishing.
Consider projection properties as SELECT projection. Refactor distinct() into marker method without accepting a boolean flag. Make distinct field final. Update tests.

Original pull request: #346.
2020-04-21 15:32:03 +02:00
Mingyuan Wu
dd7c713980 #344 - Add support for support distinct derived query methods.
We now support distinct derived queries that are useful with projections to retrieve distinct results.

interface UserRepository extends Repository<User, Long> {

  Mono<UserProjection> findDistinctByFirstName(String firstName);

}

interface UserProjection {

  String getFirstName();

}

Original pull request: #346.
2020-04-21 15:31:52 +02:00
Mark Paluch
ea464b2d37 #341 - Polishing.
Consider modifying indicators in query execution. Consider absence of Criteria for delete and update queries. Add test.

Reformat code, update documentation.

Original pull request: #345.
2020-04-21 14:38:48 +02:00
Mingyuan Wu
a210a2ea6f #341 - Add support for derived delete query methods.
Original pull request: #345.
2020-04-21 14:38:39 +02:00
Mark Paluch
d901566ed4 #342 - Polishing.
Remove Kotlin extension for Criteria as it should live in Spring Data Relational. Add author tags. Reformat code.
2020-04-21 14:13:15 +02:00
Mingyuan Wu
be00ea84ef #342 - Move off deprecated Criteria and Update. 2020-04-21 14:13:08 +02:00
Mark Paluch
af192fd488 #349 - Polishing.
Update reference documentation about query derivation support.
2020-04-21 14:02:33 +02:00
Mark Paluch
5c921c56a4 #349 - Fix parameter binding for Between queries.
We now bind the correct parameter when issuing Between queries.
2020-04-21 14:02:11 +02:00
Mark Paluch
ee46695cdd #350 - Use Testcontainers constructor with image name.
Create database containers using the constructor accepting the image name to make sure that the exposed port gets registered. A recent change in Testcontainers caused that the port is no longer registered when using the default constructor.
2020-04-20 09:39:28 +02:00
Mark Paluch
f54cc8bc5b #330 - Adapt to Criteria objects in Spring Data Relational. 2020-04-08 09:39:29 +02:00