{
Object collection = source;
if (source instanceof PersistentCollection) {
PersistentCollection col = (PersistentCollection) source;
col.forceInitialization();
// ToDo ES: collection = col.getCollectionSnapshot().getSnapshot();
collection = col.getStoredSnapshot();
}
// the set is returned as a map by Hibernate (unclear why exactly)