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