NSArray<String> relationshipNames = EOEnterpriseObjectSerializer.includedRelationshipNames.objectForKey(entity.name());
if (relationshipNames == null) {
EOEntity currentEntity = entity;
while (relationshipNames == null && currentEntity != null) {
relationshipNames = (NSArray<String>)ERXProperties.arrayForKey("er.ajax.json." + currentEntity.name() + ".relationships");
currentEntity = currentEntity.parentEntity();
}
if (relationshipNames == null) {
relationshipNames = entity.classDescriptionForInstances().toOneRelationshipKeys();
}
EOEnterpriseObjectSerializer.includedRelationshipNames.setObjectForKey(relationshipNames, entity.name());