I'm running a query using ActiveJdbc
List<Game> games = District.findAll("where createor_id = ?", creatorId);
And according o the documentation the query is triggered when I do this
for (Game game : games) {
//do things with result
}
But I want to put the result in a ModelMap in order to use in in the jstl view (Spring mvc 4). So How can I trigger the query? right now in order to trigger the query I have to do
game.size();
But I guess it's an optimal solution.