[hibernate-dev] How to configure schema name for mapped entity / table in JPA / hibernate
Tang Jianyu
jianyunet at gmail.com
Mon Sep 3 22:29:28 EDT 2012
Hi,
I have a question posted to stackoverflow but haven't get answer, so
want to check if someone here can help me
http://stackoverflow.com/questions/12192453/how-to-configure-schema-name-for-mapped-entity-table-in-jpa-hibernate
I have an application which need to access 2 schemas at runtime, and
the schema names need to be configured when deploy, because the name
are different for each deployment (for assembly testing, integration
testing, performance testing...)
I know JPA / hibernate can specify schema on @Table annotation, but I
need to make the schema configurable, is there anyway to add a post
processor / event listener so I can modify the hibernate meta info,
and change the table schema with my configuration?
Currently I'm looking into rewrite my own HibernateJpaVendorAdapter /
HibernatePersistence / MetaProvider, but definitely this is not a good
idea.
Thanks
Jeffrey
More information about the hibernate-dev
mailing list