-->
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 design the entity for tables with same structure?
PostPosted: Tue Dec 07, 2010 2:57 am 
Beginner
Beginner

Joined: Fri Nov 05, 2010 7:25 am
Posts: 21
Hi: 1)what is the difference between schema and a category?

That's to say in the cfg.xml,what is the meaning of hibernate.default_schema and hibernate.default_category?

2)how to handle the struture-same table?

I have ten tables in the db with the exact same structure,but the data is not.

For example:

I save some things in the Data_1H table like:

Code:
id       eventtime             ....
1        2010-01-02 12:00:00
2        2010-01-02 13:00:00
3        2010-01-02 14:00:00


And in the Data_2H table, I may save:

Code:
id       eventtime             ....
1        2010-01-02 12:23:00
2        2010-01-02 14:23:00
3        2010-01-02 16:23:00


So,I can not merger the data,then I wonder I have to create ten java entities with same properties to mapping the ten tables in db?


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.