-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Oracle, datasources and hibernate.default_schema
PostPosted: Wed Aug 19, 2009 4:47 am 
Newbie

Joined: Wed Aug 19, 2009 4:45 am
Posts: 1
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:

Code:
<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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.