Reputation: 73
I have the following code:
Query query = this.getSession().createSqlQuery("select * from db@server:table where 1=1");
List list = query.list();
which throws this error:
org.hibernate.QueryException: Not all named parameters have been set: [table] [select * from db@server:table where 1=1]
It seems that :
is considered as a parameter prefix.
How can I query between different databases? Currently, the db I'm using is informix11
.
Upvotes: 1
Views: 726
Reputation: 150283
I think you should have a different Hibernate Session Factory
producing different sessions for each Data Base you have.
You can't have one session connected to several Data bases.
Upvotes: 2