-->
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: Persistance to Dyanamic Tables
PostPosted: Mon Aug 30, 2004 2:55 pm 
Newbie

Joined: Mon Aug 30, 2004 2:48 pm
Posts: 11
I have a database schema that looks something like this:

Documents
doc_id
filecabinet_id

FileCabinet
filecabinet_id
table_name
num_fields

Example of file cabinet implementations

SchoolWork
fc_id
doc_id
attribute fields...
...
attribute fields


So. I can build the classes for the Documents and FileCabinet tables, but the other tables -- such as SchoolWork do not have a defined schema. The only thing they have in common is fc_id, and doc_id. The rest of the fields are attributes that only make sense for that file cabinet.

How do I model something like this when I only know the tables once I get the FileCabinet(s) back from the database and can read table_name from their column.

I have done this using my own framework using HashMaps to represent the attributes, but I am not sure how to do this in Hibernate. Any help would be most appreciated.


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.