public static NSArray snapshotsForObjectsFromRelationshipNamed(NSArray eos, String relKey) {
NSMutableArray result = new NSMutableArray();
if (eos.count() > 0) {
EOEnterpriseObject eo = (EOEnterpriseObject)eos.lastObject();
String entityName = eo.entityName();
EOEditingContext ec = eo.editingContext();
EOEntity entity = ERXEOAccessUtilities.entityNamed(ec, entityName);
EORelationship relationship = entity.relationshipNamed(relKey);
if(relationship.sourceAttributes().count() == 1) {
EOAttribute attribute = relationship.sourceAttributes().lastObject();
EODatabaseContext context = EOUtilities.databaseContextForModelNamed(ec, entity.model().name());