-->
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: Dynamic Table Name
PostPosted: Mon Apr 24, 2006 4:40 am 
Newbie

Joined: Thu Nov 25, 2004 11:41 am
Posts: 9
How can manage with createMapping command at runtime dynamic table name.

my program have AccountID for login, all tables names must be begin with this AccountID. I must create mapping for Persistent Class when user logging.

Can have a solution for this?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 24, 2006 7:04 am 
Senior
Senior

Joined: Tue Mar 09, 2004 2:38 pm
Posts: 141
Location: Lowell, MA USA
Why would you ever want to do this? This sounds horribly over-complicated.

Ryan-

_________________
Ryan J. McDonough
http://damnhandy.com

Please remember to rate!


Last edited by damnhandy on Mon Apr 24, 2006 7:09 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 24, 2006 7:09 am 
Senior
Senior

Joined: Tue Mar 09, 2004 2:38 pm
Posts: 141
Location: Lowell, MA USA
Sorry, I meant to continue my post - if you really must attempt this, have a look at the API docs:

http://www.hibernate.org/hib_docs/v3/api/

Specifically look at the org.hibernate.mapping and org.hibernate.cfg packages. This should show you how to manually create a mapping and pass it into the active configuration. Also, you may want to use the HibernateUtil class from the Caveat Emptor demo app:

http://caveatemptor.hibernate.org/

Ryan-

P.S.

I still maintain that this is a crazy approach :)

_________________
Ryan J. McDonough
http://damnhandy.com

Please remember to rate!


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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.