-->
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.  [ 2 posts ] 
Author Message
 Post subject: override schema name for different environments
PostPosted: Thu Feb 10, 2005 12:37 pm 
Newbie

Joined: Thu Feb 10, 2005 12:25 pm
Posts: 2
Hibernate version:
2.1.8

Mapping documents:
(do you mean post them here? it's not letting me do that for some reason, and it's too long to type the whole thing in...)

this is the relevant portion though...
<hibernate-mapping schema="myschema">
...

Code between sessionFactory.openSession() and session.close():
n/a

Full stack trace of any exception that occurs:
n/a

Name and version of the database you are using:
n/a

The generated SQL (show_sql=true):
n/a

Debug level Hibernate log excerpt:
n/a

Problem Description

I would like to deploy a jar that contains my services layer, including the hibernate orm portion of my services. However, the jar would be deployed to different environments where the tables would be in not just different databases, but in different schemas. The table structure is identical, but the schema name is different. I have looked and talked to people, and don't see a way to do it. That means I need a completely "new" xml mapping file for each environment that differs only by the schema name defined there. Am I totally wrong? Thanks in advance for any help/explanations you can provide.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 10, 2005 12:44 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
programatically set hibernate.default_schema or mainpulate your DOM tree programatically before adding it to the configuration object.


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

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.