-->
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.  [ 2 posts ] 
Author Message
 Post subject: Can I map several Java classes on same table, same id key?
PostPosted: Mon Mar 14, 2011 9:55 am 
Newbie

Joined: Sat Jan 20, 2007 10:20 pm
Posts: 6
Hello! I am working to retrofit a legacy system using Hibernate. I want to know if using Hibernate I can map several Java classes on the same table using the same key?

Basically, the legacy system has several tables with over 100 columns. When using data from that table in use cases, only a relatively small number of columns are necessary. I don't want to load up the entire row in order to use only a subset of that.

Mapping several Java classes on the same database table using the same key would be great. The question is: Does Hibernate support that?

Colbert Philippe


Top
 Profile  
 
 Post subject: Re: Can I map several Java classes on same table, same id key?
PostPosted: Mon Mar 14, 2011 2:03 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
yes, likely - it depends on possible strategies to be able to figure out which type a row is, the simplest strategy being a value in a specific column.
Look at http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html_single/#d0e6906

_________________
Sanne
http://in.relation.to/


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

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.