1673 Commits

Author SHA1 Message Date
Greg L. Turnquist
b117fe15a6 After release cleanups.
See #2495
2022-08-29 16:58:13 +00:00
Greg L. Turnquist
44039058a5 Prepare next development iteration.
See #2495
2022-08-29 16:58:00 +00:00
Greg L. Turnquist
82fa3b12f3 Release version 2.5.12 (2021.0.12).
See #2495
2022-08-29 16:36:45 +00:00
Greg L. Turnquist
03d11a57ca Prepare 2.5.12 (2021.0.12).
See #2495
2022-08-29 16:34:17 +00:00
Mark Paluch
23f4b9f8eb Update CI properties.
See #2495
2022-06-03 09:36:03 +02:00
Greg L. Turnquist
2d3633e2fa JpaQueryLookupStrategy shouldn't use exceptions for flow control.
By using exceptions for flow control, other critical exceptions are getting masked. The lack of a resolvable query should instead leverage some sort of null value object.

See #2018.
2022-05-18 17:20:10 -05:00
John Blum
6127d376e9 Remove Docker Registry login.
Closes #2533.
2022-05-16 11:49:25 -07:00
evgeny.bovykin
6264db6d0e Fix debug logging in MergingPersistenceUnitManager.
A String.format token was missing, so `mappingFileName` was printed instead of a `persistenceUnitName`, and `persistenceUnitName` wasn't actually printed at all.

See #2526.
2022-05-10 16:54:13 -05:00
Darin Manica
1d8ecc3ee3 Fix case where the from clause is misidentified.
Add a zero-width word boundary to the regex that identifies the from clause. This is used in alias detection.

See #2508, #2260.
2022-05-05 10:09:55 -05:00
Bajohr, Rayk
4482f3a0e2 Update Maven project meta information.
See #2506.
2022-05-04 13:54:29 -05:00
Greg L. Turnquist
e0446b9a97 Polishing.
See #2260 (c93aa25), #2500, #2518.
2022-05-04 11:40:58 -05:00
Darin Manica
7c90bf74bf Correctly handle order by aliases.
In order to correctly identify aliases in the order by clause, we cannot process the from clauses left-to-right using regular expressions. These must be removed inner-to-outer. Commit c93aa25 resulted in a bug where the subquery would be incorrectly identified as the alias, as by the following query:

```
from Parent p join p.children c where not c.id not in (select c2.id from Child c2)
```

Passing in a Sort.by("name") would result in "order by c2.name" instead of "order by p.name". Thus, it was using the alias of the inner query instead of the outer query. [This comment](https://github.com/spring-projects/spring-data-jpa/issues/2260#issuecomment-929510358) suggests removing the content of the inner query, with the caveat of the entire query being surrounded by parenthesis. This commit does exactly that, by removing the subquery before the alias is identified. It also handles the case when the entire query is surrounded by parenthesis. Unit tests illustrate this along with several examples of removing the subquery to correctly identify the alias for the order by clause.

See #2260 (c93aa25), #2500, #2518.
2022-05-04 11:40:51 -05:00
Greg L. Turnquist
7d61ab2b18 Polishing.
See #2514.
2022-05-04 10:47:02 -05:00
Diego Krupitza
038ac997fc Fixes * bug in createCountQueryFor.
In commit 3e64d9ad9b a bug got introduced that uses the next symbol after the table name for the count function. With this commit this should be now resolved. The count query will use `*` when there is no alias present nor a variable.

Related tickets #2341, #2177, #2260, #2511
2022-05-04 10:46:53 -05:00
Christoph Strobl
7106f8f520 After release cleanups.
See #2467
2022-04-19 13:59:25 +02:00
Christoph Strobl
b714b4c29a Prepare next development iteration.
See #2467
2022-04-19 13:59:22 +02:00
Christoph Strobl
752f864811 Release version 2.5.11 (2021.0.11).
See #2467
2022-04-19 13:48:17 +02:00
Christoph Strobl
bf0b8c7e39 Prepare 2.5.11 (2021.0.11).
See #2467
2022-04-19 13:47:41 +02:00
Greg L. Turnquist
5d017e6706 Fix grammar mistake in reference documentation.
See #2487.
2022-04-14 09:18:42 -05:00
Greg L. Turnquist
aea1260072 Allow count queries to start with whitespace.
See #2393.
2022-04-14 09:08:59 -05:00
Greg L. Turnquist
144ad721bf Polishing. 2022-04-13 12:01:33 -05:00
Greg L. Turnquist
75c9af5320 Convert Iterable<ID> to Collection<ID> for deleteAllByIdInBatch.
JpaRepository accepts Iterable<ID> for bulk deletes. But some JPA providers require Collection<ID> instead. To avoid breaking any APIs, convert the incoming argument if it's not already a Collection.

See #2242.
2022-04-13 12:00:54 -05:00
Jedrzej Biedrzycki
edf06a9110 Properly handle nested ORDER BY clauses.
In several ways, it's possible to have various ORDER BY clauses, including SQL OVER (windowing) clauses. Need to improve handling of ORDER BY.

See #2260.
2022-03-28 13:22:26 -05:00
Diego Krupitza
3e64d9ad9b Fix missing DISTINCT in count queries.
The `COUNT_MATCH` does not consider line breaks after the `from` clause or the `where` clause. This leads to a no match scenario in the construction of the count query. With the fix we now consider line breaks/whitespaces after the `from` and `where` clause.

See #2341
Related tickets: #2177
2022-03-28 12:23:12 -05:00
Mark Paluch
32f0f54ebb After release cleanups.
See #2445
2022-03-21 14:34:34 +01:00
Mark Paluch
d30a90e005 Prepare next development iteration.
See #2445
2022-03-21 14:34:32 +01:00
Mark Paluch
a67003382d Release version 2.5.10 (2021.0.10).
See #2445
2022-03-21 14:26:37 +01:00
Mark Paluch
82de002e4a Prepare 2.5.10 (2021.0.10).
See #2445
2022-03-21 14:26:08 +01:00
Mark Paluch
9724c1f4ce Use Java 8 to build snapshots for Artifactory.
Closes #2448
2022-03-15 14:30:56 +01:00
Mark Paluch
d76ed41391 Update CI properties.
See #2445
2022-02-22 14:08:48 +01:00
Mark Paluch
80e26c2118 Upgrade to Maven Wrapper 3.8.4.
See #2451
2022-02-22 13:54:58 +01:00
Jens Schauder
7783e09887 Fix build failures with Java 16.
A few test that used reflection to access the actual SQL executed by a Query object failed with `java.lang.reflect.InaccessibleObjectException: Unable to make field protected java.lang.reflect.InvocationHandler java.lang.reflect.Proxy.h accessible: module java.base does not "opens java.lang.reflect" to unnamed module @1b9e1916`.
This change replaces the reflection used by a proper call to `unwrap`.

Original pull request #2231
2022-02-22 09:12:14 +01:00
Mark Paluch
aa5c6abdd6 Use Java 17 to build snapshots for Artifactory.
Closes #2448
2022-02-22 09:12:12 +01:00
Mark Paluch
afabd33751 Update CI properties.
See #2445
2022-02-21 14:51:43 +01:00
Mark Paluch
7a4220a09b After release cleanups.
See #2404
2022-02-18 10:32:52 +01:00
Mark Paluch
ade1cfe39c Prepare next development iteration.
See #2404
2022-02-18 10:32:50 +01:00
Mark Paluch
c07b33ddec Release version 2.5.9 (2021.0.9).
See #2404
2022-02-18 10:24:48 +01:00
Mark Paluch
9e0804012e Prepare 2.5.9 (2021.0.9).
See #2404
2022-02-18 10:24:14 +01:00
Christoph Strobl
0796fcc6df Update copyright year to 2022.
See: #2443
2022-02-17 13:42:40 +01:00
Greg L. Turnquist
d5c40a3b9f Update CI properties.
See #2404
2022-02-14 14:38:45 -06:00
Jens Schauder
072d7dd493 Polishing.
Formatting.
Fix warnings.

See #2414
Original pull request #2419
2022-02-08 15:25:35 +01:00
Ernst-Jan van der Laan
b073d00739 Support compound IdClass ID's when calling deleteAllByIdInBatch.
Convert ID's to entities and pass them to deleteAllInBatch.

Closes #2414
Original pull request #2419
2022-02-08 15:24:08 +01:00
Mark Paluch
cbb037e026 Polishing.
Extract docker credentials into properties file.

See #2413
2022-02-04 09:55:00 +01:00
Greg L. Turnquist
e6b844abff Externalize build properties.
Closes #2413.
2022-02-04 09:35:35 +01:00
Oliver Drotbohm
e930b2c539 Guard against Hibernate exposing non-embeddables as embeddables on versions > 5.4.21.
Hibernate 5.4.22 started including types managed by custom user types in the embeddables exposed via JPA's Metamodel API. This causes those to be considered types to explicitly map (read: unfold) in Spring Data REST. We now exposed a cleaned up view on this via a tweak in JpaPersistentPropertyImpl (ultimately in JpaMetamodel) looking for @Embeddable annotation on types allegedly considered embeddable by Hibernate.

Fixes #2421.
2022-01-26 22:52:33 +01:00
Mark Paluch
88022d12e1 Use IdentifiableType.hasSingleIdAttribute() to detect IdClass presence to obtain IdClass attributes.
We now use IdentifiableType.hasSingleIdAttribute() to detect whether a type should have an IdClass. hasSingleIdAttribute is defined to return false if an IdClass is being used. It could also return false in case multiple identifier attributes are in place (composite Id) which is a bit of a grey area. At least we avoid using Hibernate-specific API.

Original pull request #2412
See #2330
Closes #2391
2022-01-21 16:18:23 +01:00
Christoph Strobl
7f8d9e83be After release cleanups.
See #2354
2022-01-14 10:00:57 +01:00
Christoph Strobl
0431f37928 Prepare next development iteration.
See #2354
2022-01-14 10:00:53 +01:00
Christoph Strobl
abaffb1f9a Release version 2.5.8 (2021.0.8).
See #2354
2022-01-14 09:47:47 +01:00
Christoph Strobl
5714a642f1 Prepare 2.5.8 (2021.0.8).
See #2354
2022-01-14 09:47:06 +01:00