Enumeration partialRelationships = partialExtensionEntity.relationships().objectEnumerator();
while (partialRelationships.hasMoreElements()) {
EORelationship partialRelationship = (EORelationship) partialRelationships.nextElement();
if (partialEntity.relationshipNamed(partialRelationship.name()) == null) {
NSMutableDictionary<String, Object> relationshipPropertyList = new NSMutableDictionary<String, Object>();
partialRelationship.encodeIntoPropertyList(relationshipPropertyList);
EORelationship primaryRelationship = new EORelationship(relationshipPropertyList, partialEntity);
primaryRelationship.awakeWithPropertyList(relationshipPropertyList);
partialEntity.addRelationship(primaryRelationship);
}