// List<T> retrievedEntities = p.get().getByKeys(referenceObjClass,
// (List) __getKeysAsList());
// so we do it the lousy way: FIXME
final List<T> retrievedEntities = new ArrayList<T>(listOfKeys.size());
final Datastore ds = p.get();
for (final Key<?> k : listOfKeys) {
retrievedEntities.add((T) ds.getByKey(referenceObjClass, k));
}
if (!ignoreMissing && (numberOfEntitiesExpected != retrievedEntities.size())) {
throw new LazyReferenceFetchingException(format("During the lifetime of a proxy of type '%s', some referenced Entities"
+ " of type '%s' have disappeared from the Datastore.",