diff --git a/lib/entity_collection.class.dart b/lib/entity_collection.class.dart index 89fe4b9..3bcea19 100644 --- a/lib/entity_collection.class.dart +++ b/lib/entity_collection.class.dart @@ -61,9 +61,11 @@ class EntityCollection { List getAll(List ids) { List result = []; - _entities.forEach((id, Entity entity){ - if (ids.contains(id)) { - result.add(entity); + //TODO optimize this + ids.forEach((id){ + Entity en = get(id); + if (en != null) { + result.add(en); } }); return result;