mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-18 09:05:21 +00:00
Fix Sybase Connection#getSchema() throws an exception
This commit is contained in:
parent
c01734adca
commit
aaba4767fe
@ -13,6 +13,7 @@
|
||||
import org.hibernate.engine.jdbc.env.spi.IdentifierCaseStrategy;
|
||||
import org.hibernate.engine.jdbc.env.spi.IdentifierHelper;
|
||||
import org.hibernate.engine.jdbc.env.spi.IdentifierHelperBuilder;
|
||||
import org.hibernate.engine.jdbc.env.spi.NameQualifierSupport;
|
||||
import org.hibernate.engine.spi.LoadQueryInfluencers;
|
||||
import org.hibernate.engine.spi.SessionFactoryImplementor;
|
||||
import org.hibernate.query.CastType;
|
||||
@ -287,4 +288,9 @@ public IdentifierHelper buildIdentifierHelper(IdentifierHelperBuilder builder, D
|
||||
return super.buildIdentifierHelper( builder, dbMetaData );
|
||||
}
|
||||
|
||||
@Override
|
||||
public NameQualifierSupport getNameQualifierSupport() {
|
||||
return NameQualifierSupport.CATALOG;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -406,6 +406,9 @@ public TableInformation getTable(Identifier catalog, Identifier schema, Identifi
|
||||
}
|
||||
|
||||
private Identifier getCurrentSchema(JdbcEnvironment jdbcEnvironment) {
|
||||
if ( jdbcEnvironment.getNameQualifierSupport() == NameQualifierSupport.CATALOG ) {
|
||||
return null;
|
||||
}
|
||||
if ( currentSchema != null ) {
|
||||
return currentSchema;
|
||||
}
|
||||
@ -427,6 +430,9 @@ private Identifier getCurrentSchema(JdbcEnvironment jdbcEnvironment) {
|
||||
}
|
||||
|
||||
private Identifier getCurrentCatalog(JdbcEnvironment jdbcEnvironment) {
|
||||
if ( jdbcEnvironment.getNameQualifierSupport() == NameQualifierSupport.SCHEMA ) {
|
||||
return null;
|
||||
}
|
||||
if ( currentCatalog != null ) {
|
||||
return currentCatalog;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user