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
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
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
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
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
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
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
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
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
1. null check on variable `metadata` is missing in method `existsById`
2. `CrudMethodMetadata::getComment` should be `@Nullable`
Closes#2991
Original pull request: #2995
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