EOEditingContext ec = eo.editingContext();
EOClassDescription cd = eo.classDescription();
if (cd.attributeKeys().containsObject(key)) {
value = NSKeyValueCodingAdditions.Utility.valueForKeyPath(eo, key);
} else if (cd.toOneRelationshipKeys().containsObject(key)) {
value = eo.valueForKeyPath(key);
} else if (EOUtilities.entityNamed(ec, eo.entityName()).primaryKeyAttributeNames().containsObject(key)) {
// when object is an EO and key is a cross-relationship keypath, we drop through to this case
// and we'll fail.
value = EOUtilities.primaryKeyForObject(ec,eo).objectForKey(key);
} else {