-->
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: Two tables, one object
PostPosted: Tue Apr 17, 2007 9:22 am 
Newbie

Joined: Fri Jan 26, 2007 9:58 am
Posts: 18
Location: Dublin
Hi,

Due to integration with an existing datamodel and databse I need to map two tables into one object. For example, a vehicle has a make, model and a colour, these are represented by lookup tables, referenced by primary key from the vehicle table. I can easily map this using a one to one from vehicle, but the vehicle class already has methods for getModelCode, getModelDescription and similarly for the vehicle make/colour. Is there anyway to do this, without creating a Make/Model/Colour object in the vehicle class? Have searched in vein so far :( The relationship is always one to one...

Thanks,

Chris.


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.