Set<String> pendingModelNames = new HashSet<String>(versions.keySet());
while (!pendingModelNames.isEmpty()) {
Iterator<String> modelNamesIter = pendingModelNames.iterator();
while (modelNamesIter.hasNext()) {
String modelName = modelNamesIter.next();
EOModel model = modelGroup.modelNamed(modelName);
Enumeration entitiesEnum = model.entities().objectEnumerator();
while (entitiesEnum.hasMoreElements()) {
EOEntity entity = (EOEntity) entitiesEnum.nextElement();
EOEntity parentEntity = entity.parentEntity();
if (parentEntity != null && !parentEntity.model().equals(model)) {