-->
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: Store key value pair from table in a Map
PostPosted: Tue Feb 13, 2007 6:19 pm 
Newbie

Joined: Tue Feb 13, 2007 5:59 pm
Posts: 1
I am new to Hibernate, would really appreciate your help on this.

I have a table named Properties with two columns Name and Value and Name is the primary key.

I have a class named SystemProperties with a Map as the class variable. How can I read the values from the database and save in the Map? Any change required to the class is acceptable. Explanation with the help of mapping file would really be appreciated.


Hibernate version: 3.2


Name and version of the database you are using:Oracle 9


Top
 Profile  
 
 Post subject: Re: Store key value pair from table in a Map
PostPosted: Thu Feb 15, 2007 2:28 am 
Newbie

Joined: Wed Feb 14, 2007 2:51 am
Posts: 5
Hi,

have a look at Collection mapping in the Hibernate docs.

http://www.hibernate.org/hib_docs/annotations/reference/en/html/entity.html#entity-mapping-association-collections
http://www.hibernate.org/hib_docs/v3/reference/en/html/collections.html

I think you should find the answer there.

Wenca


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.