-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
HHH-19685 Rework multi-table handling code to allow caching and help Hibernate Reactive #10680
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
Thanks for your pull request! This pull request appears to follow the contribution rules. › This message was automatically generated. |
hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmInterpretationsKey.java
Fixed
Show fixed
Hide fixed
@@ -393,6 +464,26 @@ | |||
} | |||
} | |||
|
|||
public static String createInsertedRowNumbersSelectSql( | |||
TemporaryTable temporaryTable, | |||
Function<SharedSessionContractImplementor, String> sessionUidAccess, |
Check notice
Code scanning / CodeQL
Useless parameter Note
NamedTableReference targetTableReference, | ||
Supplier<Consumer<SelectableConsumer>> tableKeyColumnVisitationSupplier, | ||
SqlExpressionResolver sqlExpressionResolver, | ||
TableGroup rootTableGroup, |
Check notice
Code scanning / CodeQL
Useless parameter Note
...c/main/java/org/hibernate/query/sqm/mutation/internal/temptable/TableBasedInsertHandler.java
Fixed
Show fixed
Hide fixed
insertStatement.setSourceSelectStatement( querySpec ); | ||
applyAssignments( assignments, insertStatement, temporaryTableReference, getEntityDescriptor() ); | ||
final JdbcServices jdbcServices = getSessionFactory().getJdbcServices(); | ||
final SharedSessionContractImplementor session = executionContext.getSession(); |
Check notice
Code scanning / CodeQL
Unread local variable Note
return entityTable.getColumns().subList( startIndex, endIndex ); | ||
} | ||
|
||
private void applyAssignments(List<Assignment> assignments, InsertSelectStatement insertStatement, NamedTableReference temporaryTableReference, EntityPersister entityDescriptor) { |
Check notice
Code scanning / CodeQL
Useless parameter Note
// generated values within the jdbc insert operaetion itself | ||
final InsertGeneratedIdentifierDelegate identifierDelegate = (InsertGeneratedIdentifierDelegate) insertDelegate; | ||
final ValueBinder jdbcValueBinder = basicIdentifierMapping.getJdbcMapping().getJdbcValueBinder(); | ||
for ( Map.Entry<Object, Object> entry : entityTableToRootIdentity.entrySet() ) { |
Check warning
Code scanning / CodeQL
Dereferenced variable may be null Warning
entityTableToRootIdentity
this
5ee29a6
to
5045fc2
Compare
SqmJdbcExecutionContextAdapter executionContext) { | ||
final QuerySpec idTableIdentifierSubQuery = ExecuteWithTemporaryTableHelper.createIdTableSelectQuerySpec( | ||
getIdTable(), | ||
sessionUidParameter, |
Check notice
Code scanning / CodeQL
Useless parameter Note
b7cb358
to
faf80dc
Compare
Since this has impact outside of just ORM we should have an associated Jira. I created one - https://hibernate.atlassian.net/browse/HHH-19685 I can update the commit messages if you want. I'll do that later today (and apply the PR) if you don't get to it. |
…to allow caching and help Hibernate Reactive
a515763
to
08ee7ca
Compare
[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-19685