diff options
-rw-r--r-- | Source/SPUserManager.m | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/SPUserManager.m b/Source/SPUserManager.m index f666f01c..4ed2675e 100644 --- a/Source/SPUserManager.m +++ b/Source/SPUserManager.m @@ -753,8 +753,12 @@ return; } } - // Remove any selections. - [treeController removeSelectionIndexPaths:[treeController selectionIndexPaths]]; + NSSet *registeredObjects = [managedObjectContext registeredObjects]; + for (NSManagedObject *registeredObject in registeredObjects) + { + [self.managedObjectContext refreshObject:registeredObject mergeChanges:NO]; + } + [self.managedObjectContext reset]; [grantedSchemaPrivs removeAllObjects]; [grantedTableView reloadData]; @@ -1051,7 +1055,7 @@ NSMutableArray *revokePrivileges = [NSMutableArray array]; NSString *dbName = [schemaPriv valueForKey:@"db"]; - + dbName = [dbName stringByReplacingOccurrencesOfString:@"_" withString:@"\\_"]; NSString *statement = [NSString stringWithFormat:@"SELECT USER,HOST FROM `mysql`.`db` WHERE USER=%@ AND HOST=%@ AND DB=%@", [[schemaPriv valueForKeyPath:@"user.parent.user"] tickQuotedString], [[schemaPriv valueForKeyPath:@"user.host"] tickQuotedString], |