Commit Graph

2011 Commits

Author SHA1 Message Date
Greg L. Turnquist
cd5b4e7b4f Polishing.
See #3134
2023-09-05 09:00:00 -05:00
shin-mallang
b97efc9429 Polishing a switch statement.
See #3134
2023-09-05 08:59:56 -05:00
shin-mallang
358e4b5878 Polish code using instanceof pattern matching.
See #3134
2023-09-05 08:59:46 -05:00
Greg L. Turnquist
34a9c047c8 NEW should be legal as a token in a state field path expression in JPQL.
A multi-node token that has NEW as one of its elements should work just fine in a JPQL query.

See #3128
2023-08-28 12:35:57 -05:00
Mark Paluch
bdbab7120b Correctly validate mixed parameter bind marker usage.
We now inspect individual parameters instead of the resulting query whether the query contains JDBC-style bind markers. Previously, we inspected the final (rewritten) query which might have contained question marks in literals leading to improper validation failures.

Closes #3125
2023-08-25 09:33:06 +02:00
Mark Paluch
00ee738231 Register individual bindings for IN bindings if parameter is already bound differently.
We now register a new parameter binding if the named/positional parameter is already bound in an incompatible style.

Closes #3126
2023-08-25 09:16:14 +02:00
Mark Paluch
508667f43e After release cleanups.
See #3072
2023-08-18 14:07:35 +02:00
Mark Paluch
955212e66c Prepare next development iteration.
See #3072
2023-08-18 14:07:33 +02:00
Mark Paluch
7e4ed9921b Release version 3.1.3 (2023.0.3).
See #3072
2023-08-18 14:04:03 +02:00
Mark Paluch
3d147b9e4f Prepare 3.1.3 (2023.0.3).
See #3072
2023-08-18 14:03:47 +02:00
Julia Lee
9a9c43f773 Update CI properties.
See #3072
2023-08-14 11:25:43 -04:00
Julia Lee
27acaa06ba Upgrade to Maven Wrapper 3.9.4.
See #3113
2023-08-14 07:55:27 -04:00
Greg L. Turnquist
73d1760c47 Test against Hibernate 6.3 on CI.
See #3106
2023-08-09 17:03:05 -05:00
Sergey Rukin
ad61fba1f4 Add 'since' headers to Specification javadocs.
See #3102, #3089
2023-08-04 14:48:55 -05:00
Greg L. Turnquist
a5cfcfb157 HQL function names should support schema-based prefixes.
See #3099
2023-08-04 10:26:44 -05:00
Greg L. Turnquist
b5106d1ada TIME should be valid parameter name for JPQL queries.
See #3093
2023-08-02 14:22:05 -05:00
Greg L. Turnquist
34e2331190 FROM and DATE should be usable as parameters in JPQL queries.
See #3092
2023-08-02 13:45:55 -05:00
Greg L. Turnquist
a096ce28bd Verify that mismatched return types are caught.
Verify that when a return type doesn't match the query's type, an exception is thrown.

See #1184
2023-07-26 16:51:47 -05:00
Greg L. Turnquist
a217fc4eeb Make SpEL behavior consistent.
See #1597
2023-07-26 15:14:23 -05:00
Greg L. Turnquist
0e2e5ffaa4 Upgrade to EclipseLink 4.0.2.
See #2900
2023-07-25 15:51:01 -05:00
Greg L. Turnquist
572a77fb4b Polishing.
See #3041
2023-07-21 14:17:10 -05:00
Mark Paluch
a55480f245 Ensure correct bindings for parameter reuse.
We now verify all bindings to ensure that a like-parameter doesn't mix up with plain bindings (e.g. firstname = %:myparam or lastname = :myparam). We also create unique synthetic parameters for positional bindings.

Also, fix Regex to properly detect named, anonymous and positional bind markers.

See #3041
2023-07-21 14:01:15 -05:00
Mark Paluch
c22348153f Revise String Query ParameterBinding.
We now distinguish between the binding parameter target and its origin. The parameter target represents how the binding is bound to the query, the origin points to where the binding parameter comes from (method invocation argument or an expression).

The revised design removes the assumption that binding parameters must match their indices/names of the method call to introduce synthetic parameters for different binding variants while using the same underlying invocation parameters.

See #3041
2023-07-21 14:01:09 -05:00
Mark Paluch
a1e6bbcd98 Use unique named parameter bindings for like parameters.
We now replace LIKE expressions according to their type with individual bindings if an existing binding cannot be used because of how the bound value is being transformed.

WHERE foo like %:name or bar like :name becomes
WHERE foo like :name (i.e. '%' + :name) or bar like :name_1 (i.e. :name)

See #3041
2023-07-21 14:01:00 -05:00
Mark Paluch
5f84e2aa63 Consider Tuples in Keyset extraction.
We now consider Tuple values when the query uses tuples for e.g. interface projections when extracting keyset values.

Closes #3077
2023-07-20 12:03:02 +02:00
Mark Paluch
d6bcdf36e1 After release cleanups.
See #3033
2023-07-14 13:57:59 +02:00
Mark Paluch
d929c3edef Prepare next development iteration.
See #3033
2023-07-14 13:57:57 +02:00
Mark Paluch
6a355ebe9d Release version 3.1.2 (2023.0.2).
See #3033
2023-07-14 13:54:07 +02:00
Mark Paluch
00c727d369 Prepare 3.1.2 (2023.0.2).
See #3033
2023-07-14 13:52:53 +02:00
Greg L. Turnquist
3facc2ae58 Handle != as NOT EQUALS for JPQL.
See #3061.
2023-07-11 10:52:40 -05:00
Greg L. Turnquist
56de051d6f TYPE should be a valid attribute of an entity for a custom query.
See #3062, #3056.
2023-07-10 11:07:22 -05:00
Greg L. Turnquist
49ebc1ab0f Sort properties shouldn't overlap with aliases.
When using an alias in a query, verify using "." as a proper separator against both alias projections as the primary alias to ensure that a Sort property doesn't overlap with an alias.

See #3054
2023-07-05 13:14:23 -05:00
Mark Paluch
f8a0476d0f Update CI properties.
See #3033
2023-07-03 09:48:57 +02:00
Mark Paluch
ea3ed3905f Upgrade to Maven Wrapper 3.9.3.
See #3048
2023-07-03 09:48:17 +02:00
Greg L. Turnquist
742852251a Handle backslash characters for LIKE ESCAPE clause.
Hibernate HQL supports using a `\\` as the ESCAPE character so we need to support it in our custom parser.

See #3040
2023-06-26 13:20:26 -05:00
Mark Paluch
fb4214ca36 Correctly apply OffsetScrollPosition to derived queries.
We now apply the scroll position correctly regardless of whether the query is limited.
Previously, we applied the position only if the query was limited.

Closes #3015
2023-06-26 10:34:03 +02:00
Mark Paluch
6eda785ac7 Reuse parsed SQL statement for alias and projection detection.
Closes #3039
2023-06-26 09:40:02 +02:00
Mark Paluch
f67dd9b655 Backoff JSqlParserQueryEnhancer if query type is not a supported query type.
We now backoff from enhancing queries if the query type is not supported (e.g. TRUNCATE).

Closes #3038
2023-06-26 09:40:01 +02:00
John Blum
bcddc94c85 After release cleanups.
See #2949
2023-06-16 08:13:30 -07:00
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