for (HasUuid entity : entities) {
Class<? extends HasUuid> key = entity.getClass();
// Ignore any dirty-tracking entity with no mutations
if (entity instanceof PersistenceAware) {
PersistenceAware maybeDirty = (PersistenceAware) entity;
if (maybeDirty.wasPersistent() && maybeDirty.dirtyPropertyNames().isEmpty()) {
continue;
}
}
List<HasUuid> list = toReturn.get(key);