EORelationship relationship = (EORelationship) relationshipsEnum.nextElement();
String relationshipName = relationship.name();
NSArray originalDestinationGIDs = database.snapshotForSourceGlobalID(keyGID, relationshipName);
if (originalDestinationGIDs != null) {
NSMutableArray newDestinationGIDs = new NSMutableArray();
EOQualifier qualifier = relationship.qualifierWithSourceRow(database.snapshotForGlobalID(keyGID));
EOFetchSpecification relationshipFetchSpec = new EOFetchSpecification(entityName, qualifier, null);
EOAdaptorChannel channel = databaseContext.availableChannel().adaptorChannel();
channel.openChannel();
try {
channel.selectAttributes(relationship.destinationEntity().attributesToFetch(), relationshipFetchSpec, false, relationship.destinationEntity());