Hi Everyone,
It seems my problem is trivial, but i'm in a dead-end…
My application connects to a table through a synonym, here is what i have :
Synonym : MY_USER.MY_SYNONYM
Target object : USER_PROD.MY_TABLE.
But for persistance tests, i have an another table in the same schema 'USER_PROD' :
Synonym : MY_USER_TEST.MY_SYNONYM
Target object : USER_PROD.MY_TABLE_TEST
The two synonyms are differents but have the same names to doesn't have to change Hibernate mapping.
Code:
<hibernate-mapping>
<class name="com.bla.tableVO"
table="MY_SYNONYM" >
...
</class>
</hibernate-mapping>
Unfortunatly, during tests i can't connect to my test Synonym, the message is :
Code:
...
09:48:07,396 INFO [SchemaValidator] (main:) Running schema validator
09:48:07,396 INFO [SchemaValidator] (main:) fetching database metadata
09:48:07,677 INFO [DatabaseMetadata] (main:) table not found: MY_SYNONYM
...
But, in the mapping file, if i change the name of the synonym by the name of the target table, the connection works well.
I read everywhere that it was transparent to Hibernate to map a table, a synonym or a view.
Does anyone know why my synonym is not found ?