Java Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJava Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old September 1st, 2005, 04:50 PM
pawelsm pawelsm is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Location: muenchen
Posts: 5 pawelsm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 14 m 49 sec
Reputation Power: 0
hibernate one class two tables ?

Dear All,

I have tree like data structure with different types of nodes. Each node type is a single class. There is number of common variables for each class (like: name, parent_id, distanceFromRoot) plus variables which are specific for given node type.

My idea was to map all nodes to one table regardless of type as a entity type - this is easy part; plus store specific variables as a value type in the different tables. That way I have one table with tree structure and one with specific information.

The question would be is it possible to map part of class variables to different column.

Sincerely,

Pawel

Reply With Quote
  #2  
Old April 17th, 2008, 07:45 AM
eejimkos eejimkos is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 4 eejimkos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 43 m 40 sec
Reputation Power: 0
hii

just an idea..by using the jdk 6 u have collections.search it.u can describe ur different values there.and then make :
Map<String,List<type of collection>>.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJava Development > hibernate one class two tables ?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT