You can access mutual relations with their properties, similar to this: (I haven't checked it, so the sintaxis might not be correct, but the idea is the same).
if ([results count] > 0)
{
for (Users *user in results)
{
for (Groups *group in user.inGroups)
group.isActive = [NSNumber numberWithBool:YES];
}
if (![context save:&error2])
{
NSLog(@"Error couldn't save: %@", [error2 localizedDescription]);
}
}