Skip to content

Conversation

@beikov
Copy link
Member

@beikov beikov commented Oct 31, 2025

DON'T MERGE YET.


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.


beikov and others added 10 commits October 31, 2025 15:48
(cherry picked from commit b3955d7)
(cherry picked from commit 3e3fd6f)
Added handling of subclasses with the same table name and discriminator condition.
Also avoid useless left-joins when not finding table references instead of throwing an exception.

(cherry picked from commit 22091b2)
(cherry picked from commit dbaf309)
Also, fix a small bug in special not-null discriminator predicate rendering

(cherry picked from commit 317334f)
@hibernate-github-bot
Copy link

hibernate-github-bot bot commented Oct 31, 2025

Thanks for your pull request!

This pull request does not follow the contribution rules. Could you have a look?

❌ All commit messages should start with a JIRA issue key matching pattern HHH-\d+
    ↳ Offending commits: [287be61]
❌ The PR title or body should list the keys of all JIRA issues mentioned in the commits
    ↳ Issue keys mentioned in commits but missing from the PR title or body: [HHH-19883, HHH-17777, HHH-16494, HHH-17096, HHH-16798]

› This message was automatically generated.

return baseRestriction;
}

final SqmJunctionPredicate combinedPredicate;

Check notice

Code scanning / CodeQL

Confusing overloading of methods Note

Method SqmCreationHelper.combinePredicates(..) could be confused with overloaded method
combinePredicates
, since dispatch depends on static types.
public void cleanup(SessionFactoryScope scope) {
scope.inTransaction( s -> {
s.createNativeQuery( "delete from root_one" ).executeUpdate();
s.createNativeQuery( "delete from SubChildEntityA1" ).executeUpdate();

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note test

Invoking
QueryProducerImplementor.createNativeQuery
should be avoided because it has been deprecated.
scope.inTransaction( s -> {
s.createNativeQuery( "delete from root_one" ).executeUpdate();
s.createNativeQuery( "delete from SubChildEntityA1" ).executeUpdate();
s.createNativeQuery( "delete from SubChildEntityA2" ).executeUpdate();

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note test

Invoking
QueryProducerImplementor.createNativeQuery
should be avoided because it has been deprecated.
s.createNativeQuery( "delete from root_one" ).executeUpdate();
s.createNativeQuery( "delete from SubChildEntityA1" ).executeUpdate();
s.createNativeQuery( "delete from SubChildEntityA2" ).executeUpdate();
s.createNativeQuery( "delete from child_entity" ).executeUpdate();

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note test

Invoking
QueryProducerImplementor.createNativeQuery
should be avoided because it has been deprecated.
s.createNativeQuery( "delete from SubChildEntityA1" ).executeUpdate();
s.createNativeQuery( "delete from SubChildEntityA2" ).executeUpdate();
s.createNativeQuery( "delete from child_entity" ).executeUpdate();
s.createNativeQuery( "delete from BaseClass" ).executeUpdate();

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note test

Invoking
QueryProducerImplementor.createNativeQuery
should be avoided because it has been deprecated.
s.createNativeQuery( "delete from SubChildEntityA2" ).executeUpdate();
s.createNativeQuery( "delete from child_entity" ).executeUpdate();
s.createNativeQuery( "delete from BaseClass" ).executeUpdate();
} );

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note test

Invoking
QueryProducerImplementor.createNativeQuery
should be avoided because it has been deprecated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants