-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
HHH-19556 Introduce SqmCacheable for query caching via #isCompatible and #cacheHashCode instead of equals/hashCode #10899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
} | ||
else { | ||
final Set<SqmParameter<?>> parameters = new HashSet<>( this.parameters.size() ); | ||
final Set<SqmParameter<?>> parameters = new LinkedHashSet<>( this.parameters.size() ); |
Check notice
Code scanning / CodeQL
Possible confusion of local and field Note
copyParameters
parameters
return e1 == null ? e2 == null : e1.isCompatible( e2 ); | ||
} | ||
|
||
static boolean areCompatible(@Nullable Collection<? extends SqmCacheable> collection1, @Nullable Collection<? extends SqmCacheable> collection2) { |
Check notice
Code scanning / CodeQL
Confusing overloading of methods Note
areCompatible
* @author Christian Beikov | ||
*/ | ||
public class SqmCteTable<T> extends AnonymousTupleType<T> implements JpaCteCriteriaType<T> { | ||
public class SqmCteTable<T> extends AnonymousTupleType<T> implements JpaCteCriteriaType<T>, SqmCacheable { |
Check warning
Code scanning / CodeQL
Serializable but no void constructor Warning
AnonymousTupleType
? one.getPosition().compareTo( o2.getPosition() ) | ||
: 1; | ||
} | ||
throw new HibernateException( "Unexpected SqmParameter type for comparison : " + this + " & " + o2 ); |
Check notice
Code scanning / CodeQL
Use of default toString() Note
} | ||
|
||
public List<SqmJoin<?, ?>> getOrderedJoins() { | ||
public @Nullable List<SqmJoin<?, ?>> getOrderedJoins() { |
Check notice
Code scanning / CodeQL
Exposing internal representation Note
after this call to getOrderedJoins
…and #cacheHashCode instead of equals/hashCode
[Please describe here what your change is about]
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.
https://hibernate.atlassian.net/browse/HHH-19556