NSPredicate(format: "active == FALSE")) as RLMResults? { realm.beginWriteTransaction() for postObj in posts { if let post = postObj as? Post { post.active = true } } realm.commitWriteTransaction() }
[["Fido", 1]]]) realm.create(Person.self, value: ["Mary", [["Rex", 2]]]) } // Log all dogs and their owners using the "owners" inverse relationship let allDogs = realm.objects(Dog) for dog in allDogs { let ownerNames = dog.owners.map { $0.name } println("\(dog.name)") }