if (!classes.containsKey(objectClass)) {
Map<Property, Collection<CascadeType>> beanPropertiesFor = StrategyUtils.getBeanPropertiesFor(propertyProvider, objectClass, migrator);
// Finally, create a fake "classesCollection" property and add it to
// property
try {
ClassCollectionProperty classes = new ClassCollectionProperty(objectClass).withAnnotation(new ManyObjectsToOneType(objectClass.getClass()));
beanPropertiesFor.put(classes, StrategyUtils.extractCascadeOfJPAAnnotations(classes));
TypeProperty type = new TypeProperty(objectClass).withAnnotation(new ManyObjectsToOneType(objectClass.getClass()));
beanPropertiesFor.put(type, StrategyUtils.extractCascadeOfJPAAnnotations(type));
} catch (Exception e) {
logger.log(Level.SEVERE, "what ? a class without a \"class\" field ? WTF", e);
}
classes .put(objectClass, beanPropertiesFor);
}
return classes.get(objectClass);
}