Integer targetPropertyOid = prop.getPropertyType().getTargetPropertyOid();
PropertyType targetProperty;
String targetPropertyName;
Class<?> targetQueryType;
ClassMappings classMappings = ClassMappings.fromImpl(relatedObject.getClass());
targetQueryType = classMappings.getInterface();
targetProperty = dbMappings.getPropertyType(targetPropertyOid);
targetPropertyName = targetProperty.getPropertyName();
Set<Integer> propertyTypeIds;
propertyTypeIds = dbMappings