Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JPA Entities - Mapping multiple columns to a collection - too many columns

843830Sep 9 2009 — edited Sep 10 2009
Hi All,
I am using a table which has 30 minute window for each hour on a Day. [24*2 = 48 columns for a particular attribute for a day]. And similarly i have to maintain 5 attributes (so 5*48 = 240 columns)

Table structure - [ Id | attr1_01 | attr1_02 | ..| attr1_48 | attr2_01 | attr2_02 | ..| attr2_48 | attr3_01.....attr3_48 .....]

These columns are simple and at the maximum, they have a single digit number for each slot.

Leaving apart the question of normalization, How can I create a JPA entity for this table effectively? Is there a way to map this to arrays? like attr1[0] to attr1[47] ? Or any other collection?

Thanks for your help !!!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 8 2009
Added on Sep 9 2009
2 comments
387 views