JPA Entiy on synonym instead of table

My guess is that hbm2ddl seaches specifically for tables, and not for synonyms, but that your application should indeed work as if the tables existed in the schema. Try to remove the hbm2ddl option and test your application.

EDIT: it seems my guess is true: https://forum.hibernate.org/viewtopic.php?p=2438033


As of 4.3.0, It is possible to set hibernate.synonyms=true to solve your problem with synonyms.

References:

https://github.com/hibernate/hibernate-orm/commit/1df4b2ea3c98c74f3b6bbd42e266ee5c7ad60d27

https://hibernate.atlassian.net/browse/HHH-8183

https://github.com/hibernate/hibernate-orm/pull/508