if (relationship.isToManyToOne() && destinationEntity.isAbstractEntity() && fetchSpec.prefetchingRelationshipKeyPaths().containsObject(relationship.name())) {
EOFetchSpecification newFetchSpec = (EOFetchSpecification) fetchSpec.clone();
String inverseName = relationship.anyInverseRelationship().definition(); // from destination to intermediate
EOQualifier singleTableRestrict = destinationEntity._singleTableRestrictingQualifier();
EOQualifier migratedRestrict = EOQualifierSQLGeneration.Support._qualifierMigratedFromEntityRelationshipPath(singleTableRestrict, destinationEntity, inverseName);
newFetchSpec.setQualifier(new EOAndQualifier(new NSArray(new Object[]{newFetchSpec.qualifier(),migratedRestrict})));
fetchSpec = newFetchSpec;
}
}
return fetchSpec;
}