Commit Graph

2220 Commits

Author SHA1 Message Date
Christoph Strobl
6ecb45fe04 Revert packaging changes of performance module.
...and remove duplicate properties entry.

See: #3309
2024-08-22 09:05:06 +02:00
Mark Paluch
52e6aef4a7 Polishing.
Use structured NullsPrecedence rendering in JPQL renderer.

Throw UnsupportedOperationException for the time being until Nulls Precedence is supported through Criteria API.

See #3529
2024-08-21 15:08:22 +02:00
Christoph Strobl
410152af3a Support NULLS {FIRST | LAST} in JPQL queries.
This commit adds support for parsing and appending order by items that define a NULL precedence.

Closes #3529
2024-08-21 15:08:22 +02:00
Mark Paluch
a784a419f2 Update GitHub Actions.
See #3482
2024-08-21 09:28:22 +02:00
arefbehboudi
9d7d735d3c Polishing JpaMetamodel.
Closes: #3555
Original Pull Request: #3559
2024-08-20 14:42:29 +02:00
Mark Paluch
a38941519b Refactor instanceof to use pattern variable.
Closes #3586
2024-08-20 14:11:07 +02:00
Mark Paluch
06212b57fc Polishing.
Remove serialVersionUID for types that aren't serializable.

See #3584
2024-08-20 14:06:32 +02:00
Seol_JY
55a3112cb2 Add @Serial annotation to all serialVersionUID fields.
- Enhance code readability and maintainability
- Improve static analysis capabilities
- Ensure proper declaration of serialVersionUID fields

Closes #3584
2024-08-20 14:06:16 +02:00
Jens Schauder
90a8b15454 Sort revisions by revision number.
Timestamps might not be unique, but the revision number "should form a strictly-increasing sequence of numbers".

See https://docs.jboss.org/hibernate/orm/5.2/javadocs/org/hibernate/envers/RevisionNumber.html
Closes #3579
2024-08-19 15:01:04 +02:00
Jens Schauder
d82c6b1a3d Polishing.
Original pull request #3576
2024-08-19 13:01:00 +02:00
arefbehboudi
a8ef74fe32 Cleaned up EnversRevisionRepositoryImpl the code to enhance readability and maintainability.
Original pull request #3576
2024-08-19 12:59:45 +02:00
Mark Paluch
558c26b355 Polishing.
Merge antora prepare tasks into a single run.

See #3539
2024-08-19 09:41:22 +02:00
Mark Paluch
298c1c6e3c Polishing.
Consistently convert Iterable to Collection for identifier parameters.

See #3580
2024-08-14 10:15:39 +02:00
Seol_JY
f7aed2a333 Polishing.
Replace Collection.class.isInstance with instanceof for type checking. Remove unnecessary type check for ConfigurableListableBeanFactory in postProcessBeanFactory method.

Closes #3580
2024-08-14 10:15:23 +02:00
Mark Paluch
3483e16657 Polishing.
Defer user-class lookup.

See #3564
2024-08-13 11:14:28 +02:00
Seol_JY
58fe95f1d6 Optimize entity deletion in SimpleJpaRepository.
This change improves the performance of the delete method by first checking if the entity is already managed by the EntityManager. If so, it removes the entity directly without additional database queries. This optimization can reduce unnecessary database lookups in certain scenarios.

Closes #3564
2024-08-13 11:14:20 +02:00
Mark Paluch
a44bca82c6 Polishing.
Use Javadoc macro. Reformat code.

See #3544
2024-08-12 09:37:37 +02:00
Tran Ngoc Nhan
bd106f9323 Replace documentation link to deprecated ResultTransformer with its replacement ResultListTransformer.
Closes #3544
2024-08-12 09:37:37 +02:00
Mark Paluch
1c370512f1 Upgrade to Hibernate 6.6.
Closes #3574
2024-08-12 09:10:40 +02:00
Mark Paluch
b279ff0b88 Polishing.
Fix typos, move QueryTransformers.filterCountSelection to CountSelectionTokenStream.create.

Original Pull Request: #3553
2024-08-09 13:45:51 +02:00
Mark Paluch
9d4bde3e7d Suppress selection item aliasing for the actual count query.
We now no longer apply count selection filtering but rather skip select field aliasing when rendering a count query to drop the field alias within a count query.

Previously, we removed field aliasing by filtering the token stream which also removed the AS keyword from cast operators.

Closes: #3536
Original Pull Request: #3553
2024-08-09 13:45:21 +02:00
Christoph Strobl
e3da2f7c47 Add support for using custom BeanNameGenerator.
Closes: #3440
2024-08-09 10:12:09 +02:00
Seol_JY
9e54c37a8a Fix typo in assertion message.
Corrected the assertion message from "Sample must not be null" to "Example must not be null" for clarity and consistency.

Closes #3565
2024-08-08 11:37:51 +02:00
Mark Paluch
a16d82ef7a Revert "Upgrade to Hibernate 6.5.2.Final."
This reverts commit b6f62b19e9.

See #3567
2024-08-08 10:43:35 +02:00
Mark Paluch
0f65ba1887 Upgrade to Maven Wrapper 3.9.8.
See #3570
2024-08-08 10:21:59 +02:00
Mark Paluch
33a47dca81 Update CI properties.
See #3482
2024-08-08 10:20:10 +02:00
Mark Paluch
b6f62b19e9 Upgrade to Hibernate 6.5.2.Final.
Closes #3567
2024-08-08 10:00:47 +02:00
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