Commit Graph

2243 Commits

Author SHA1 Message Date
Oliver Drotbohm
c5b6e9fd69 Add profile for Hibernate 7 stable previews. 2024-08-06 13:20:42 +02:00
Oliver Drotbohm
0e4f488a79 Add build profile for Hibernate 6.6 stable previews.
Fixes GH-3562.
2024-08-06 10:37:22 +02:00
Oliver Drotbohm
493fbb0d15 Align AuditingEntityWithEmbeddableListenerTests.auditsEmbeddedCorrectly() with aggregate lifecycle expectations.
Fixes GH-3561.
2024-08-06 10:30:50 +02:00
Mark Paluch
71e36ee36b Fix CDI integration test.
Closes #3558
2024-08-05 11:06:00 +02:00
Eric Haag
acf6ddc5da Migrate build to Spring Develocity Conventions extension.
* Migrate build to Spring Develocity Conventions extension.

* Adopt Develocity environment variables.

Closes #3552
2024-08-05 10:43:59 +02:00
Mark Paluch
3191b88e82 Polishing.
Ensure ordering of the last query only, applying ordering after the set operation.

Original pull request: #3429
See #3427
2024-08-02 10:21:24 +02:00
Christoph Strobl
b02081b439 Fix order by rendering for queries containing UNION.
Make sure to append space after order by clause and fix alias detection for wrapped sub select.
Also make sure to ignore alias used in subselect so they do not conflict with root ones.

Render order by only on full select if set operator is present in EQL.

Original pull request: #3429
Closes #3427
2024-08-02 10:21:24 +02:00
Mark Paluch
8a95dba706 Remove exception guard for absent query handling.
We now no longer fall back to an absent query when a NamedQuery construction fails with IllegalArgumentException. IllegalArgumentException is also used by the JPA API to indicate an absent query. In other cases, where we fail with IllegalArgumentException, we fell back to query derivation as handling IAE as signal for an absent query.

We already have better query absence checks in place so we can remove the try/catch blocks in favor of the named query presence check.

Closes #3550
2024-08-01 10:17:03 +02:00
Mark Paluch
c7e324286f Bundle Javadoc with Antora documentation site.
Closes #3549
2024-07-31 08:58:00 +02:00
Mark Paluch
c438348d4d Polishing.
Reformat documentation.

See #3546
2024-07-24 09:06:54 +02:00
Mark Paluch
adf182eaa4 Remove #sort check for sorted native queries.
We now no longer check for #sort in native queries to apply sorting directly. This was a leftover from earlier query rewriting.

Closes #3546
2024-07-24 09:06:54 +02:00
Christoph Strobl
2d5146a028 Upgrade Hibernate 6.2 & 6.5 Snapshots.
See: #3473
2024-07-04 12:48:33 +02:00
Christoph Strobl
a5a2ae73d3 Add test for derived finder method using unpaged with sort. 2024-07-04 11:55:12 +02:00
birariro
38a11d0445 Apply sort from unpaged Pageable to query.
This commit makes sure to pass on a given Sort from an unpaged Pageable to the actual query.

Closes: #3476
Original Pull Request: #3517
2024-07-04 11:55:12 +02:00
soominsohn
c0ae93c9af Fix typo in README.adoc
The correct wildcard for JPQL is `%`.

Original pull request #3530
2024-07-04 09:39:24 +02:00
Mark Paluch
018c833afd Polishing.
Skip Query.setFirstResult(…) if the pagable offset is not zero.

See #3242
Original pull request: #3454
2024-06-27 14:50:17 +02:00
Yanming Zhou
d14899f16b Ignore offset for if it defaults to 0.
Avoid calling `Query.setFirstResult(0)` which maybe generated sql contains unwanted `offset 0` when using query methods accepting `Limit` .

Closes #3242
Original pull request: #3454
2024-06-27 14:49:21 +02:00
Mark Paluch
8bade4e0a4 Update documentation on native query rewriting.
See #3155
Original pull request: #3353
2024-06-26 15:08:21 +02:00
Mark Paluch
3e9d39445d Polishing.
Add tests, update documentation, add support for SQL ResultSet mapping.

See #3155
Original pull request: #3353
2024-06-26 15:08:15 +02:00
danvandeee
594534150e Implement @NativeQuery annotation.
Annotation to declare native queries directly on repository methods. NativeQuery acts as a shortcut for @Query(nativeQuery = true)

Closes #3155
Original pull request: #3353
2024-06-26 15:07:02 +02:00
Mark Paluch
009c6a90ef Polishing.
Reformat pom, replace http urls with HTTPS.

See #3309
2024-06-26 13:48:23 +02:00
Christoph Strobl
5743888c3f Use early exit in QueryTransformers and introspectors.
Avoid iterating tokens when things had been discovered already and reduce visibility of StringQuery to previous value.

See: #3309
2024-06-25 09:12:00 +02:00
Mark Paluch
0a5a56fd91 Optimize QueryTokenStream handling.
This commit moves EQL and HQL parsers to QueryTokenStream and optimizes composite renderers as well as JSQLParser usage.
We also avoid Single-thread construction on each parse run to avoid thread creation overhead.

See: #3309
2024-06-25 09:09:57 +02:00
Christoph Strobl
f793c9eef0 Move query rendering to dedicated TokenRenderer.
This commit introduces a QueryTokenStream to reduce the number of stream and collect operations to estimate the size before iterating entries.

See: #3309
2024-06-25 09:05:45 +02:00
Mark Paluch
2dc94dde8c Refactor native query handling and JsqlParser usage.
This commit introduce eager alias and projection detection and aims to cache expensive calls.
It also revises JPQL parsers and enhancers into single-class hierarchy and removes strange parameter verification (as it was wrong anyway).

See: #3309
Closes: #3311
2024-06-25 09:00:07 +02:00
Mark Paluch
3e1c8a28a9 Refactor EQL, HQL & JPQL query rendering.
This commit turns existing query transformers into introspectors using eager parsing and detection of query parts.
Query transformation has also been split up into dedicated Count and Sort Query parts.
To reduce duplicate code across the existing parses we introduced a reusable functional configuration.
For better testing support a query assertion has been introduced to query parser tests and we adjusted invalid formatting.

See: #3309
Closes: #3326
2024-06-25 08:54:49 +02:00
Mark Paluch
f607dd2757 Polishing.
Update placeholders to recent syntax, reduce test fork count.

See: #3309
2024-06-25 08:45:26 +02:00
Christoph Strobl
b8319a07b9 Add performance module.
Add new module using JMH to benchmark certain aspects of query parsing & rendering.

See: #3309
2024-06-25 08:43:44 +02:00
Christoph Strobl
d60efe6cf9 Update nullability annotations and javadoc.
Reflect allowed null arguments in both documentation as well as supporting annotations.
Going forward we should consider if there is a possibility to restructure Specification and the Predicate handling to avoid this at all (#3521).

See: #3036
2024-06-21 11:21:30 +02:00
Yanming Zhou
206c4f55e3 Fix warnings for passing 'null' argument to parameter annotated as non nullable.
Relates to: #3036
Closes: #3468
2024-06-21 09:33:15 +02:00
Mark Paluch
021feda3fb Remove Slack notification.
See #3519
2024-06-20 14:20:15 +02:00
Mark Paluch
cacc178636 Switch to Broadcom docker proxy.
Closes #3519
2024-06-20 14:20:01 +02:00
Jens Schauder
3351350c03 Polishing.
Remove superfluous empty line comments.

See #3504
Original pull request #3508
2024-06-13 15:28:11 +02:00
Christoph Strobl
0f6736fc1a Fix count query creation for HQL when using CTE.
Closes #3504
Original pull request #3508
2024-06-13 15:25:02 +02:00
Mark Paluch
59ac57d798 Polishing.
Simplify code, refine constructor visibility.

See #3322
2024-06-13 14:25:11 +02:00
devholic22
7a1d5dc3bc Update iteration variable name in PersistenceProviderUnitTests for readability.
Closes #3322
2024-06-13 14:25:04 +02:00
Mark Paluch
e2b05387a3 Replace synchronized block with ReentrantLock.
Closes #3505
2024-06-12 15:40:43 +02:00
Christoph Strobl
724555ac47 Fix query parsing error for properties using reserved lateral keyword.
Add tests for existing parsers and fix the HQL one.

Closes #3496
Original pull request #3497
2024-06-12 11:46:33 +02:00
Seungrae
2656308893 Fix typo and broken links in documentation.
Closes #3489
2024-06-10 10:39:32 +02:00
Mark Paluch
2cd6d00de9 Mark delete(Specification) as transactional method.
Override readOnly to false.

Closes #3499
2024-06-05 15:34:54 +02:00
Mark Paluch
cf40f36972 Polishing.
Enusre same annotation order.

See #3499
2024-06-05 15:34:43 +02:00
Mark Paluch
4387a31069 After release cleanups.
See #3422
2024-05-17 11:51:34 +02:00
Mark Paluch
23569d6356 Prepare next development iteration.
See #3422
2024-05-17 11:51:32 +02:00
Mark Paluch
2316742994 Release version 3.3 GA (2024.0.0).
See #3422
2024-05-17 11:49:25 +02:00
Mark Paluch
3eeef04b4f Prepare 3.3 GA (2024.0.0).
See #3422
2024-05-17 11:49:10 +02:00
Yanming Zhou
a1fadec432 Remove unused imports.
Closes: #3469
2024-05-14 14:51:26 +02:00
Mark Paluch
ed351e3696 Polishing.
Tweak naming, simplify implementation.

See #3462
Original pull request: #3472
2024-05-14 14:37:58 +02:00
Yanming Zhou
3a2e433af0 Add camelCase to snake_case fallback for native query projections.
Closes #3462
Original pull request: #3472
2024-05-14 14:37:58 +02:00
Christoph Strobl
966b43c008 Polishing.
Additional tests for stored procedure out parameter detection.
Update Nullability annotations and Javadoc.
Reduce method visibility.
See: #3460
2024-05-13 15:41:10 +02:00
Thorben Janssen
d8d6591a06 Retain stored procedure parameter position.
Store the position of each output parameter in ProcedureParameter so that it can be used when extracting them from the result set.

Resolves: #3460
Original Pull Request: #3463
2024-05-13 15:03:30 +02:00