-->
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: Named Query problem
PostPosted: Thu Sep 08, 2011 7:53 pm 
Newbie

Joined: Fri Apr 08, 2011 6:24 am
Posts: 9
Hi, I have a problem with named query and hashMap and I couldn't find info in doc. I'm interested in create named query with "custom" select and map it to hashmap in my entityClass.
For example, query like this:
select one as key_one, two as key_two.....

and entity:
class MyEntity{
HashMap map;
...
}

and I want create resultSet which will "fill" the map with values from select.
After query I want have something like this:
entity.map.key_one => value one
entity.map.key_two => two

it is clear for Me how to map values from select to property of entity but I can't find a way to map it as key/value pair in mentioned hashMap


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.