Skip to content

Commit

Permalink
[#1935] Fix for next the Hibernate ORM upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideD committed Aug 2, 2024
1 parent e2de138 commit f4ee6da
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,9 @@ public ReactiveToOneAttributeMapping copy(
TableGroupProducer declaringTableGroupProducer) {
return new ReactiveToOneAttributeMapping( super.copy( declaringType, declaringTableGroupProducer ) );
}

@Override
protected Object lazyInitialize(Object domainValue) {
return domainValue;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/
package org.hibernate.reactive.provider.service;

import java.lang.invoke.MethodHandles;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
Expand All @@ -14,6 +15,8 @@
import org.hibernate.boot.model.TruthValue;
import org.hibernate.boot.model.naming.DatabaseIdentifier;
import org.hibernate.boot.model.naming.Identifier;
import org.hibernate.reactive.logging.impl.Log;
import org.hibernate.reactive.logging.impl.LoggerFactory;
import org.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl;
import org.hibernate.tool.schema.extract.internal.ColumnInformationImpl;
import org.hibernate.tool.schema.extract.spi.ColumnInformation;
Expand All @@ -29,6 +32,8 @@
*/
public abstract class AbstractReactiveInformationSchemaBasedExtractorImpl extends AbstractInformationExtractorImpl {

private static final Log LOG = LoggerFactory.make( Log.class, MethodHandles.lookup() );

public AbstractReactiveInformationSchemaBasedExtractorImpl(ExtractionContext extractionContext) {
super( extractionContext );
}
Expand Down Expand Up @@ -154,6 +159,20 @@ protected <T> T processCatalogsResultSet(ExtractionContext.ResultSetProcessor<T>
);
}

@Override
protected <T> T processCrossReferenceResultSet(
String parentCatalog,
String parentSchema,
String parentTable,
String foreignCatalog,
String foreignSchema,
String foreignTable,
ExtractionContext.ResultSetProcessor<T> processor) {
// This method has been added as fix for https://hibernate.atlassian.net/browse/HHH-18221
// The issue is only for Informix that we don't currently support.
throw LOG.notYetImplemented();
}

@Override
protected <T> T processSchemaResultSet(
String catalog,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

import org.hibernate.engine.jdbc.internal.JdbcServicesImpl;
import org.hibernate.engine.jdbc.spi.JdbcServices;
import org.hibernate.engine.jdbc.spi.SqlExceptionHelper;
import org.hibernate.engine.jdbc.spi.SqlStatementLogger;
import org.hibernate.reactive.containers.DatabaseConfiguration;
import org.hibernate.reactive.pool.ReactiveConnectionPool;
Expand Down Expand Up @@ -64,6 +65,11 @@ private ReactiveConnectionPool configureAndStartPool(Map<String, Object> config)
public SqlStatementLogger getSqlStatementLogger() {
return new SqlStatementLogger();
}

@Override
public SqlExceptionHelper getSqlExceptionHelper() {
return new SqlExceptionHelper( true );
}
} );
DefaultSqlClientPool reactivePool = new DefaultSqlClientPool();
reactivePool.injectServices( registryExtension.getServiceRegistry() );
Expand Down

0 comments on commit f4ee6da

Please sign in to comment.