-->
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: taking data from several table to a Map object
PostPosted: Thu Apr 05, 2007 3:09 pm 
Newbie

Joined: Thu Apr 05, 2007 2:18 pm
Posts: 2
Location: Israel
Hi All,

I'm new in hibernate and now using hibernate 3.2.1.

I need to take data from three table and store it in Map object.

I have the following tables in the database:

Parameter_Definition(parameter_id int,
parameter_name nvarchar(100),
parameter_data_type int)

Parameter_Value(Parameter_id int,
parameter_value nvarchar(100))


Dataset(id int IDENTITY,
dataset_id int,
parameter_id int)

The relationships are:
Parameter_Definition - Parameter_Value => one to many.
Parameter_Value - Dataset => Many to one

I have three classes that are mapped by Hibernate annotations.
My problem is that in the Dataset class I have a Set object which holds the dataset's parameters, while I want a Map which its key is the parameter name and the value is the Parameter_Value instance.
How can I do it?


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.