-->
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 Tables
PostPosted: Thu Feb 12, 2009 4:07 pm 
Newbie

Joined: Thu Oct 23, 2008 6:37 pm
Posts: 2
In my application I need to access and create tables daily, as would be the mapping with annotations? For example on 2009-02-11, I have create table_20090211 with id "id_table_20090211", on 2009-02-12, I have crate table_20090212 with id "id_table_20090212"...

Sorry for my english, I'm learning yet.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 12, 2009 10:49 pm 
Senior
Senior

Joined: Tue Aug 01, 2006 9:24 pm
Posts: 120
It would be interesting to know the use case which makes you need to create new tables on a daily basis like that.

The only thing I can think of is to find a way to use reflection and edit the class in memory. If the tables always have the same structure this shouldn't be that hard.

I wouldn't know how to do this but you'll have to make sure the session factory knows about this maybe you'll have to recreate the sessionFactory and configuration everytime?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 13, 2009 1:11 am 
Regular
Regular

Joined: Wed Apr 25, 2007 11:44 pm
Posts: 59
which database u r using

i suggest that u should use table partitioning


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.