-->
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: How to map a class to more than one record?
PostPosted: Mon Jun 12, 2006 8:20 am 
Senior
Senior

Joined: Sun Jun 11, 2006 10:41 am
Posts: 164
Example:
I have a table of "vehicles" (id, prop, value), each vehicle is represented by a set of properties in the table, like so:
Code:
id prop      value
--------------------
1  type      bicycle
1  rim_type  chrome
1  seat_type leather
2  type      plane
2  wingspan  30
2  fueltype  liquid

I would like to build a generic "Vehicle" class out of the 3 first records, the 3 next records (based on the ID of course), and so on.
How can I do this?

Hibernate version: 3.1


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.