-->
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.  [ 1 post ] 
Author Message
 Post subject: how to create and access dynamic table
PostPosted: Thu Nov 12, 2009 11:13 pm 
Beginner
Beginner

Joined: Mon Feb 02, 2009 3:22 am
Posts: 26
Hi all,

In my project of billing system, there is a table of long distance call rate, tb_ldrate, since the rate changes with time, the user need to create a new tb_ldrate when the rate changes. in that case the table name would be like tb_ldrate_20090101_20100630 to indicate the valid time peroid.

In hibernate the mapping between PO and the SQL table is pre-configured, it seems to me that it is impossible to manage table dynamically, so I have to add two columns to the original tb_ldrate indicating the start time and end time, for example, for the rate for long distance call to UNITED KINGDOM by Skype, after adding these two columns, the table will have many records of different time peroid for the call rate to UNITED KINGDOM , the bad side of this solution is that the table grows fast and error-prone.

Does anybody have any idea? Thanks in advance!

Lucy


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.