Make sure that you don't specify schema in Hibernate mappings if you have public synonym defined for tables in Oracle.
Here is the setup. I had a table MY_TABLE mapped in MyTable.hbm.xml. In the database, a public synonym "MyTable" is created for MY_TABLE. I also had two schema definitions in Hiberante. One is the default schema in Spring config.
The second is in MyTable.hbm.xml
At runtime, Hibernate has problem resolving and working on the right table. It worked after schema definitions were removed from both places and left the resolution to Oracle.
Showing posts with label hibernate mapping schem oracle synonym schema. Show all posts
Showing posts with label hibernate mapping schem oracle synonym schema. Show all posts
Thursday, April 9, 2009
Subscribe to:
Posts (Atom)