Commit Graph

2493 Commits

Author SHA1 Message Date
Mark Paluch
eeca4df36f Detect PersistenceUnitManager and PersistenceManaged types in JpaRepositoryContributor.
See #3875
2025-05-16 12:25:59 +02:00
Mark Paluch
01eb2b833d Polishing.
Reuse setReturningFunction and genericFunctionArguments structure for easier extension. Split fromRoot into separate parser function fragments.

Fix trailing spaces.

See: #3864
Original pull request: #3879
2025-05-16 12:25:59 +02:00
oscarfanchin
2ebe4caba6 Add support for Set-Returning Functions (SRF) to HQL parser and query rendering.
Signed-off-by: oscarfanchin <oscar.fanchin@gmail.com>

Closes: #3864
Original pull request: #3879
2025-05-16 12:25:59 +02:00
Mark Paluch
85fcbcd2fb Support HQL LIMIT/OFFSET without ordering.
Closes #3882
2025-05-16 12:25:59 +02:00
Mark Paluch
6bffef2a58 Polishing.
See #3868
2025-05-16 12:25:58 +02:00
Mark Paluch
50113038aa Fix EQL and JPQL LIKE with ESCAPE clause parsing.
Closes #3873
2025-05-16 12:25:58 +02:00
Mark Paluch
c96bf905b2 Upgrade to Oracle OJDBC 23.8.0.25.04.
Closes #3881
2025-05-16 12:25:58 +02:00
Mark Paluch
8556a7b968 Update CI Properties.
See #3854
2025-05-16 12:25:58 +02:00
Christoph Strobl
e802143baf Polishing.
Original Pull Request: #3868
2025-05-16 12:25:58 +02:00
Mark Paluch
17a59905a7 Explore returning Search Results.
Closes: #3868
2025-05-16 12:25:58 +02:00
Mark Paluch
e6a008cf08 Fix JPQL and EQL CAST(…) function parsing.
We now define arithmetic, string, and typed cast functions to support all potential variants of casting supported by JPQL and EQL.

Closes #3863
2025-05-16 12:25:58 +02:00
Mark Paluch
b66c96d363 Use SelectionQuery.getResultCount() for count queries if possible.
We now use Hibernate's built-in mechanism to obtain the result count if there is an enclosing transaction. Without the transaction, the session is being closed and we cannot run the query.

Closes #3456
2025-05-16 12:25:57 +02:00
Mark Paluch
219e5c58e4 Fliter jakarta.persistence types from AOT Metamodel.
Otherwise, Hibernate fails with weird resolution errors.

See #3872
2025-05-16 12:25:57 +02:00
Mark Paluch
01e4e75617 Use isolated Hibernate EntityManager for AOT contribution.
Closes #3876
2025-05-16 12:25:57 +02:00
Mark Paluch
e1cec313f3 Use LocalVariableNameFactory in repository contributor.
Closes #3875
2025-05-16 12:25:57 +02:00
Mark Paluch
65214fb0b1 Provide JpaRepositoryFragmentsContributor in JPA Repository Factory and Repository Factory Bean.
Closes #3874
2025-05-16 12:25:57 +02:00
Christoph Strobl
eb4ad0923d Upgrade to Hibernate 7.0.0.CR1.
Closes: #3872
2025-05-16 12:25:57 +02:00
Mark Paluch
7f20f10b30 Polishing.
Introduce doWithPlainSelect(…) callback for easier filtering of Select subtypes. Add test for known (previously) failing case.

See: #3869
Original pull request: #3870
2025-05-16 12:25:56 +02:00
Diego Pedregal
b3c0210f17 Removes PlainSelect casting in JSqlParserQueryEnhancer.
Closes: #3869
Original pull request: #3870

Signed-off-by: Diego Pedregal <diego.p.hidalgo@gmail.com>
2025-05-16 12:25:56 +02:00
Mark Paluch
2435807db4 Avoid DTO Constructor Expression rewriting for selection of nested properties.
We back off from rewriting String-based queries to use DTO Constructor expressions if the query selects a property that is assignable to the return type.

Closes #3862
2025-05-16 12:25:56 +02:00
Mark Paluch
41bfd415ca Polishing.
Add fix to Update, Delete, and PredicateSpecification. Reformat code. Refine tests.

See #3849
Original pull request: #3856
2025-05-16 12:25:56 +02:00
SWQXDBA
dc854df741 Fix handling of null predicate in Specification.not().
When toPredicate() returns null, Specification.not() now returns
builder.disjunction() instead of builder.not(null). This change
ensures proper handling of null predicates in negated specifications.

Closes #3849
Original pull request: #3856

Signed-off-by: SWQXDBA <983110853@qq.com>
2025-05-16 12:25:56 +02:00
Mark Paluch
5ebfdb6566 Polishing.
Add dynamic projection benchmark.
2025-05-16 12:25:56 +02:00
Mark Paluch
403e1b4d01 Use parameter names in derived JPQL queries.
We also use improved parameter naming for keyset queries for easier correlation of values.

Closes #3857
2025-05-16 12:25:56 +02:00
Mark Paluch
ddeac0cacd After release cleanups.
See #3751
2025-05-16 12:25:55 +02:00
Mark Paluch
c57ee667bf Prepare next development iteration.
See #3751
2025-05-16 12:25:55 +02:00
Mark Paluch
68fb398b4b Release version 4.0 M2 (2025.1.0).
See #3751
2025-05-16 12:25:55 +02:00
Mark Paluch
8ac384c96e Prepare 4.0 M2 (2025.1.0).
See #3751
2025-05-16 12:25:55 +02:00
Mark Paluch
fe3c22dad0 Polishing.
Fix post-rebase conflicts.

See #3622
2025-05-16 12:25:55 +02:00
hgh1472
1781819e59 Remove unnecessary parameter.
Remove unnecessary boolean nativeQuery from checkHasNamedParameter of StringQueryUnitTests class.

Signed-off-by: hgh1472 <hgh1472@naver.com>

Closes #3827
Original pull request: #3828
2025-05-16 12:25:55 +02:00
Christoph Strobl
0e7aef080f Remove hardcoded repository fragment from test setup.
See #3830
2025-05-16 12:25:55 +02:00
Mark Paluch
fbd214f72e Polishing.
Run AotMetamodel against live EntityManagerFactory, use Environment to check for AOT repository enabled flag.

See #3830
2025-05-16 12:25:54 +02:00
Mark Paluch
eb1266888f Add support for JSON repository metadata.
See #3830
2025-05-16 12:25:54 +02:00
Mark Paluch
be4d8528b3 Add AOT repository benchmarks.
See #3830
2025-05-16 12:25:54 +02:00
Mark Paluch
d3cc7da3d9 Add support for QueryRewriter.
See #3830
2025-05-16 12:25:54 +02:00
Mark Paluch
9fe7d423ef Document AOT repositories.
See #3830
2025-05-16 12:25:54 +02:00
Mark Paluch
f2b0dca62b Add support for projections.
See #3830
2025-05-16 12:25:54 +02:00
Mark Paluch
e38b219898 Add support for Entity Graphs.
See #3830
2025-05-16 12:25:54 +02:00
Mark Paluch
4b0a83a97b Simplify package structure.
See #3830
2025-05-16 12:25:53 +02:00
Mark Paluch
22dfb1c22b Add support for Value Expressions, Stream, Named and Modifying Queries.
See #3830
2025-05-16 12:25:53 +02:00
Mark Paluch
b419041cb6 Add support for Value Expressions, Stream, Named and Modifying Queries.
See #3830
2025-05-16 12:25:53 +02:00
Mark Paluch
daae010e21 Polishing.
Fix Like with starts/ends, use proper parameter origins instead of assuming binding name matches parameter names. Simplify binding block.

See #3830
2025-05-16 12:25:53 +02:00
Mark Paluch
802a8db1d1 Add query hint support.
See #3830
2025-05-16 12:25:53 +02:00
Mark Paluch
c399ca2b54 Refactoring.
Introduce AotRepositoryFragmentSupport, adopt to FragmentCreationContext.
Reduce visibility. Refactor CodeBlocks builder. Simplify query rewriting and use base class methods.
Use typed verifier through a JDK proxy to avoid reflective frontend.
Revise testing to a plain old Spring test but testing the AOT fragment through its interface by forwarding reflective calls to the AOT fragment.
Refactor AotQuery into AotQueries to support a wider range of possible queries.

See #3830
2025-05-16 12:25:53 +02:00
Christoph Strobl
831d04dd2c Add support for AOT repositories.
Closes #3830
2025-05-16 12:25:53 +02:00
Mark Paluch
b58c423bdf Upgrade to Eclipselink 5.0.0-B07.
Closes #3837
2025-05-16 12:25:52 +02:00
Mark Paluch
be5fcb30ce Upgrade to Hibernate 7.0.0.Beta5.
Closes #3836
2025-05-16 12:25:52 +02:00
Mark Paluch
1529ec252a Apply QueryRewriter to count queries as well.
We now use QueryRewriter to post-process count queries as well. Previously, only the actual result query has been processed.

Closes #3801
2025-05-16 12:25:52 +02:00
Mark Paluch
e2446caf38 Polishing.
Introduce refined names: EntityQuery, TemplatedQuery, ParametrizedQuery, QueryProvider. Return QueryProvider where possible. Introduce rewrite as concept on DeclaredQuery to retain its nature and track the origin of the query rewriting.

Move methods solely used in tests to TestDefaultEntityQuery.

Remove unused methods, fix naming, group DeclaredQuery implementations in DeclaredQueries. Add documentation.

See #3622
Original pull request: #3527
2025-05-16 12:25:52 +02:00
Christoph Strobl
5da86f1bf0 Refactoring.
See #3622
Original pull request: #3527
2025-05-16 12:25:52 +02:00