-->
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: How I can change Hibernate schema to runtime...
PostPosted: Sun Nov 19, 2006 6:42 am 
Newbie

Joined: Sun Jan 01, 2006 1:39 pm
Posts: 15
Hello,

I want to change the mapping (...hbm.xml) schema="..." to runtime.

I only want to switch to another databaseschema.

How could I do this?

Thanks for help.

Daniel


Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:3.05


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 19, 2006 3:18 pm 
Expert
Expert

Joined: Tue Dec 28, 2004 7:02 am
Posts: 573
Location: Toulouse, France
I'm not sure it's possible, but maybe you could do it by customizing your HibernateUtil class. I think you could do it by creating two SessionFactories, one for each schema.

Then, in your code, you would be easily able to retrieve Sessions from one of the two schemas by querying the right SessionFactory.

_________________
Baptiste
PS : please don't forget to give credits below if you found this answer useful :)


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.