-->
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: How to load hbm in runtime?
PostPosted: Sun Oct 14, 2007 10:21 pm 
Newbie

Joined: Tue Oct 09, 2007 1:53 am
Posts: 3
I want to add a new entity in runtime, but SessionFactory is immutable, so I can't chang it, anyone who can tell me how to do this, thanks a lot.


Last edited by ghostfear on Mon Oct 15, 2007 11:32 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 15, 2007 5:45 am 
Expert
Expert

Joined: Tue Dec 07, 2004 6:57 am
Posts: 285
Location: Nürnberg, Germany
The only thing you can do is: close the SessionFactory, add the new Entity to the Configuration and then ramp up a new SessionFactory.

_________________
Please don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 15, 2007 9:41 pm 
Newbie

Joined: Tue Oct 09, 2007 1:53 am
Posts: 3
thx MikePloed

It's not a good choice for me to rebuild SessionFactory, as so many hbms here.

Any other thoughts?


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.