[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Oracle, datasources and hibernate.default_schema
gcoleman
do-not-reply at jboss.com
Tue Aug 18 04:20:32 EDT 2009
I'm using hibernate inside JBoss with an Oracle datasource. Usually when I do JDBC queries against the datasource it uses the schema as defined in the -ds.xml. But with hibernate I have to add the hibernate.default_schema property in persistence.xml too:
| <persistence-unit name="jpaPersistence">
| <jta-data-source>java:/MainDS</jta-data-source>
| ...
| <properties>
| <property name="hibernate.default_schema" value="guy" />
| ...
|
I've got a set up where the schema changes a lot between environments and ususally I can change the -ds.xml in deploy/ and that's all that needs doing.
However with hibernate have to change the persistence.xml file inside the EAR too - I want to avoid have to change the EAR file if I can help it.
I was wondering if there was a way of making hibernate pick up the default schema from the datasource?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250078#4250078
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250078
More information about the jboss-user
mailing list