-->
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: Array in a map?
PostPosted: Tue Feb 28, 2012 9:41 am 
Newbie

Joined: Tue Feb 28, 2012 9:28 am
Posts: 1
Hey

I was wondering if it is possible to create a map (with select new map(...) ) with another map inside of it. or an array is good as well.

I return map values so i can generate JSON fast and easy. But I cant get it to retrieve my Bags.
For example:
I have a user and a user has an id, a name, some favorite orders (a Bag of Order objects)... now i want to return a map of my user with his id his name and an array (or something) with the id's of all his favorite orders. so the result would look like:
Code:
Map result {
   id: 1
   name: testUser
   favoriteOrderIds: [2, 5, 13]
}


Is there a possibility for this? And if I have 2 Bags in my user Object because I noticed it isn't possible to fetch 2 bags at the same time


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.