wladelin wrote:
Hello,
I have a hibernate based application working right but when i needed to transfer it to another database whith the similar tables i've seen (using Query analyser) that some tables must be queryed like this " select * from mediator.TableName " where mediator is the owner of the table and my queries at hibernate do " SessionFactory.find( "SELECT t from Table t order by t.codigo" ) " .
I wanted to include in my hibernate query mediator.Table , but thats imposible it shows the error:
And i've tried to connect (using Query analyser) whith the user mediator but my queries are accepted only like mediator.TableName
Some one can help me.
Try setting a Hibernate default Schema - section 4.4 in the reference docs.
hibernate.default_schema=mediator (in a properties file)
<property name="hibernate.default_schema">mediator</property> in hibernate.cfg.xml