Commit Graph

1972 Commits

Author SHA1 Message Date
John Blum
bb1fcd7974 Prepare next development iteration.
See #2949
2023-06-16 08:13:28 -07:00
John Blum
35fd2995a2 Release version 3.1.1 (2023.0.1).
See #2949
2023-06-16 08:05:36 -07:00
John Blum
4506406749 Prepare 3.1.1 (2023.0.1).
See #2949
2023-06-16 08:05:06 -07:00
Greg L. Turnquist
05d4930dc7 Upgrade to Hibernate 6.2.4.Final.
See #3029
2023-06-15 14:37:20 -05:00
Greg L. Turnquist
7f9783c87e Handle VALUE function properly in JPQL queries.
See #3028
2023-06-15 14:30:22 -05:00
Yanming Zhou
cd1587ba1b Polishing.
delegate.getResultWindow() the first time it's called in this method already produces a limit-sized result set, captured in resultsToUse. Running it through the same getResultWindow a second time in unnecessary.

Original Pull Request: #3021
2023-06-15 11:46:12 -05:00
Mark Paluch
32f876ee07 Polishing.
See #2998
2023-06-15 15:12:49 +02:00
Yanming Zhou
f25c24fbef Remove synthetic attribute from SharedEntityManager.
AOT no longer needs this bean to be synthetic to work properly. And this attribute hampers BeanPostProcessors from being applied.

See #2730
Original Pull Request: #2866
2023-06-14 16:04:24 -05:00
Greg L. Turnquist
572efd28a9 Handle dateTimeField property with HQL.
Hibernate supports varisous duration literals. They also support a couple formats for binary literals.

See #3025
2023-06-14 14:52:03 -05:00
Greg L. Turnquist
0d03612633 Properly handle CAST functions on HQL.
See #3024
2023-06-14 12:17:39 -05:00
Mark Paluch
3132f4945b Retain scroll direction in Keyset position function of the correct item.
Closes #2999
2023-06-13 10:27:27 +02:00
Mark Paluch
c06cc38397 Polishing.
Move spring-instrument into test dependencies to eagerly resolve the dependency instead of using plugin-repositories.

See #2998
2023-06-13 09:30:31 +02:00
Mark Paluch
e641c4f0de Upgrade to Maven Wrapper 3.9.2.
See #3018
2023-06-13 08:53:54 +02:00
Greg L. Turnquist
a6e33ad1b9 Properly handle Sort's that start with a join alias.
JOIN clauses can have aliases as well, despite not using an AS reserved word. The HQL query parser needs to handle this.

See #2960, #1066, #664
Original Pull Request: 2967
2023-06-12 16:08:28 -05:00
Greg L. Turnquist
107e4c174f Add section to reference docs highlighting other possibilities.
Give users that have too complex of a query a list of where to go should Spring Data JPA not offer what they need in query support.

See #3005
Original Pull Request: #3006
2023-06-09 14:06:43 -05:00
Mark Paluch
4b63d4d11f Avoid duplicate sort orders through Keyset scrolling.
We now avoid adding sort properties if they are already specified by Sort.

Closes #2996
2023-06-08 09:47:47 +02:00
Mark Paluch
f70e74fd1d Use snapshot and milestone repositories instead of libs-snapshot and libs-milestone.
Closes #2998
2023-06-06 10:05:18 +02:00
Greg L. Turnquist
9fe908d348 Handle SIGN function properly in HQL and JPQL queries.
See #2994.
2023-06-02 14:36:15 -05:00
Mark Paluch
2df06bd736 Polishing.
Reuse comment hint retrieval. Reorder methods. Inline methods and use fluent API where possible.

See #2991
Original pull request: #2995
2023-06-02 14:36:20 +02:00
Yanming Zhou
168d7d56d3 Add missing null check for metadata.
1. null check on variable `metadata` is missing in method `existsById`
2. `CrudMethodMetadata::getComment` should be `@Nullable`

Closes #2991
Original pull request: #2995
2023-06-02 14:36:20 +02:00
Greg L. Turnquist
280726fe2b Verify that projections work with subqueries.
Interface-based projections used to NOT work when the query had a subquery in it. But with the new query parser, it already handles it. So this simply captures the test providing that corner case.

See #2008
Original Pull Request: #420
2023-06-01 10:44:21 -05:00
Greg L. Turnquist
1f28c61247 Resolve handling of ESCAPE clause with LIKE queries on EclipseLink.
Migrate tests to H2 to verify LIKE with ESCAPE works properly on EclipseLink with Spring Data JPA.

Resolves #2955
Original Pull Request: #2956.
2023-05-31 09:08:47 +02:00
Greg L. Turnquist
14642a5869 Resolve handling of ESCAPE clause with LIKE queries on Hibernate.
The HQL parser has to handle parameters in addition to character values in order to support SpEL.

Closes #2954
Original Pull Request: #2956.
2023-05-31 09:08:46 +02:00
Greg L. Turnquist
199317bf70 Upgrade to Postgres 11 for integration testing.
Postgres stored procedures requires some adjustments in order to upgrade to Postgres 11.

See #2903
2023-05-30 11:14:08 -05:00
Mark Paluch
8c7b469591 Polishing.
Simplify code flow. Introduce flag to capture whether a stored procedure uses collection return types.

Remove unconditionally the Optional converter as we're already on Java 17 and do not require the Java 8 guard.

See #2915
Original pull request: #2938
2023-05-30 15:05:56 +02:00
Greg L. Turnquist
32c8951a93 Close StoredProcedureQuery if it implements AutoCloseable.
If the JPA provider's implementation of StoredProcedureQuery implements AutoCloseable, invoke the close method when completed.

Resolves #2915.
Original pull request: #2938
2023-05-30 15:05:56 +02:00
Greg L. Turnquist
0f8279bbfa Properly handle reserved words as entity names.
In JPQL and HQL, we need to properly handle reserved words that crop up as entity names (which is legal).

See #2982.
2023-05-26 14:46:06 -05:00
Greg L. Turnquist
ad7b28063a Support Common Table Expressions in HQL parser.
See #2981.
2023-05-26 13:55:24 -05:00
Mark Paluch
bec9809f95 Polishing.
Remove unnecessary property declarations.

Original pull request: #2974
See #2973.
2023-05-26 10:26:25 +02:00
Greg L. Turnquist
ccad51bde9 Migrate to org.codehaus.mojo:aspectj-maven-plugin.
Closes #2973.
Original pull request: #2974
2023-05-26 10:26:25 +02:00
Greg L. Turnquist
d6f368dcfb Handle subqueries when used inside HQL INSERT statements.
Potentialy subqueries can crop up inside INSERT statements. We need to handle this as well.

NOTE: INSERT statements aren't defined in JPQL, so this problem doesn't overlap with standard JPA queries.

See #2977
2023-05-24 14:46:32 -05:00
Greg L. Turnquist
6d56a2525c Support alternative NOT EQUALS operators in HQL.
Hibernate also supports "!=" and "^=" as NOT EQUALS operators.

See #2970
Original Pull Request #2972
2023-05-23 08:56:27 -05:00
Greg L. Turnquist
e973c275ed HQL queries without a primary alias don't need Sorted properties prefixed.
If a Hibernate query doesn't have a primary alias, don't attempt to prefix any Sort properties using it.

See #2969
Original Pull Request #2971
2023-05-23 08:33:43 -05:00
Greg L. Turnquist
1c7a19a054 ROUND doesn't need to be a reserved word.
Because ROUND is a reserved word yet is NOT on the list of approved functions, it fails to get parsed. Simply dropping it from the list of reserved words makes it succeed in the HQL query parser.

See #2964
Original Pull Request: #2966
2023-05-22 15:32:22 -05:00
Greg L. Turnquist
da37737c22 Properly implement handling sort items.
See #2962
Original Pull Request: #2965
2023-05-22 15:32:16 -05:00
Mark Paluch
cc901527cf Update Jenkins triggers after GA release.
See #2919
2023-05-12 14:42:45 +02:00
Mark Paluch
2e6676e5e9 Update Jenkins triggers after GA release.
See #2919
2023-05-12 14:41:42 +02:00
Christoph Strobl
b121c49d14 After release cleanups.
See #2919
2023-05-12 14:19:11 +02:00
Christoph Strobl
a692e844d6 Prepare next development iteration.
See #2919
2023-05-12 14:19:09 +02:00
Christoph Strobl
0ef008ad4f Release version 3.1 GA (2023.0.0).
See #2919
2023-05-12 14:14:38 +02:00
Christoph Strobl
3145bc62e9 Prepare 3.1 GA (2023.0.0).
See #2919
2023-05-12 14:14:05 +02:00
Mark Paluch
4d9667f2c0 Adopt to changed Sort.Order constructor.
Closes #2946
2023-05-11 16:16:13 +02:00
Greg L. Turnquist
878db1d51e Rewrite LIKE clauses with wildcards as CONCAT functions.
We support wrapping parameters (named or positional) with optional wildcards when doing LIKE patterns. This is out-of-band and requires moving the wildcards into the bindings. To stop doing this and causing race conditions, we can instead rewrite the queries using the CONCAT function. This function is standard across relational database (native queries) as well as JPA providers (Hibernate and EclipseLink).

See #2939
See #2760
Original Pull Request: #2940
Superceding Pull Request: #2944
2023-05-10 09:01:00 -05:00
Mark Paluch
d2fa85ad29 Document that JpaSpecificationExecutor.delete(…) uses CriteriaDelete and hence Cascades are not considered.
Closes #2936
2023-05-10 10:44:48 +02:00
Greg L. Turnquist
b3cb1f7a53 Create a Testcontainers image name resolver to support CI proxy usage.
Ported the solution to leveraging Docker proxy services to Spring Data JPA 3.1.

Related: #2941.
Original pull request: #2937.
2023-05-05 14:59:33 -05:00
Oliver Drotbohm
87bd57821b Adapt to ScrollPosition API changes in Spring Data Commons.
Fixes #2931.
Related ticket #2824.
2023-04-27 19:56:17 +02:00
Greg L. Turnquist
4d1c4adf6e Introduce conditional testing for Hibernate.
Certain test cases should be disabled based on the version of Hibernate. We should also run the entire test suite against both Hibernate 6.1 and 6.2, to ensure maxiumum support.

Resolves #2927.
2023-04-26 14:27:27 -05:00
Greg L. Turnquist
f778a43f28 Drop hibernate-next profile.
Hibernate is not publishing snapshots for 6.1 or 6.2, so there is no need to keep this profile in our build system.

Resolves #2923.
2023-04-24 13:43:07 -05:00
Jens Schauder
1bcdbc27e7 Pagination now supports sorting by property.
Closes https://github.com/spring-projects/spring-data-envers/issues/379
Original Pull Request https://github.com/spring-projects/spring-data-envers/pull/381
2023-04-18 09:20:07 -05:00
Jens Schauder
393fa635bd Added missing null check for metadata.
See #2716
Closes #2897
2023-04-18 10:25:14 +02:00