Skip to content

Commit

Permalink
[hibernate#1838] Remove unused code
Browse files Browse the repository at this point in the history
This code causes a failure with Quarkus at start up:
quarkusio/quarkus#38263

CI still works when I remove it, and a `DeleteOrUpsertOperation`
cannot be cast to `OptionalTableUpdate` anyway,
so I don't think this code is useful.
  • Loading branch information
DavideD committed Jan 19, 2024
1 parent e5ff7de commit fc33301
Showing 1 changed file with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
package org.hibernate.reactive.persister.entity.impl;


import org.hibernate.dialect.OracleDialect;
import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.persister.entity.AbstractEntityPersister;
import org.hibernate.persister.entity.mutation.MergeCoordinator;
Expand All @@ -22,7 +21,6 @@
import org.hibernate.sql.model.ast.TableMutation;
import org.hibernate.sql.model.internal.MutationOperationGroupFactory;
import org.hibernate.sql.model.internal.OptionalTableUpdate;
import org.hibernate.sql.model.jdbc.DeleteOrUpsertOperation;
import org.hibernate.sql.model.jdbc.OptionalTableUpdateOperation;

public class ReactiveMergeCoordinatorStandardScopeFactory extends MergeCoordinator
Expand All @@ -46,6 +44,7 @@ public ReactiveScopedUpdateCoordinator makeScopedCoordinator() {
);
}

// We override the whole method but we just need to plug in our custom createOperation(...) method
@Override
protected MutationOperationGroup createOperationGroup(ValuesAnalysis valuesAnalysis, MutationGroup mutationGroup) {
final int numberOfTableMutations = mutationGroup.getNumberOfTableMutations();
Expand Down Expand Up @@ -101,15 +100,6 @@ protected MutationOperation createOperation(ValuesAnalysis valuesAnalysis, Table
factory()
);
}
if ( operation instanceof DeleteOrUpsertOperation
&& factory().getJdbcServices().getDialect() instanceof OracleDialect ) {
OracleDialect dialect = ( (OracleDialect) factory().getJdbcServices().getDialect() );
return dialect.createOptionalTableUpdateOperation(
( (OptionalTableUpdate) operation ).getMutationTarget(),
(OptionalTableUpdate) operation,
factory()
);
}
return operation;
}
}

0 comments on commit fc33301

Please sign in to comment.