-->
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: Name value pair mapping
PostPosted: Sun Jul 13, 2008 9:08 am 
Newbie

Joined: Sun Jul 13, 2008 8:55 am
Posts: 1
I have a table as follows

create table t1(
id int
name string
value int

)

sample values for the above table are
1 "p1" 1
1 "p2" 2
1 "p3" 3
2 "p1" 1


Would want to map this as

public class T1
{
int id;
Map <String,Integer> nameValuePairMap

}

This is not one to one mapping , one object is mapping to mulitple records in table. How do I create hibernate mapping for this case?

Thanks in Advance
K


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.