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.  [ 3 posts ] 
Author Message
 Post subject: Easy way to change the schema?
PostPosted: Fri Dec 16, 2005 1:23 pm 
Newbie

Joined: Tue Aug 30, 2005 9:04 pm
Posts: 9
Does the schema name have to be changed in each of the mapping files? Is there any option to use the JDBC connection url, e.g. naming=system;libraries=lib1,lib2 ??

This would make it easier since one could simply change the hibernate config file, as opposed to rerunning the gen tool, or manually changing each of the mapping files.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 16, 2005 3:34 pm 
Expert
Expert

Joined: Wed Apr 06, 2005 5:03 pm
Posts: 273
Location: Salt Lake City, Utah, USA
I'm not sure I understand what you are trying to accomplish, but you can remove all schema attributes from mapping files, and just specify default_schema in your hibernate properties file. Then you only have to change the schema in one place and it will affect all the mappings/tables.

http://www.hibernate.org/hib_docs/v3/reference/en/html_single/#configuration-optional

_________________
nathan


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 16, 2005 4:01 pm 
Newbie

Joined: Tue Aug 30, 2005 9:04 pm
Posts: 9
nathanmoon wrote:
I'm not sure I understand what you are trying to accomplish, but you can remove all schema attributes from mapping files, and just specify default_schema in your hibernate properties file. Then you only have to change the schema in one place and it will affect all the mappings/tables.

http://www.hibernate.org/hib_docs/v3/reference/en/html_single/#configuration-optional


Yeah, thats what I'm trying to accomplish, but the problem is i can only put one library in the default_schema attribute. Not like the JDBC libraries attribute appended on the connection URL. help in most cases because all files that need to be mapped are usually located in one library. Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.