Home Fully qualify Oracle table name in Hibernate
 My Setup: I am using Hibernate 5 with the Oracle JDBC driver oracle.jdbc.driver.OracleDriver and dialect org.hibernate.dialect.Oracle9iDialect. My modelclasses look like this: @Entity @Table(name = "MyModel1", catalog = "DB1") public class MyModel1 {...} @Entity @Table(name = "MyModel2", catalog = "DB2") public class MyModel2 {...}  My Problem: I have multiple modelclasses that are spread about different DBs on the same DBserver. I have to use a single DB-connection to query all of my modelclasses so I connect to DB1 for querying. Everything would be fine, if Hibernate would generate SQL queries like select * from DB1.MyModel1;  but it does not. For some reason it makes its queries without the catalog ie. select * from MyModel1;  which is fine for MyModel1 because I connect to DB1 but I need a fully qualified query for MyModel2 otherwise it throws an exception, because the table of MyModel2 cannot be found in DB1. Do you know any way to trick Hibernate or JPA or the dialect into building queries with fully qualified tablenames?