Thanks for the answer, Mario!
Yes, this method works, but I have to cast it's type, since I get as a
object.
for (Object o : flatten(forEach(aGroup.findAll()).getList())) {
AnotherObject ao = (AnotherObject) o;
// ...
}
At the source code, the flatten function is defined by:
public static <T extends Object> List<T> flatten(Object iterable) {
But the collect has two definitions:
public static <T extends Object> List<? extends T> collect(Object
iterable) {
public static <T extends Object> List<T> collect(Object iterable, T
argument) {
Can you provide the argument variable to flatten function too?
Anyway, it worked!
Thanks,
Victor