Skip to content

Conversation

@jedelbo
Copy link
Contributor

@jedelbo jedelbo commented Aug 16, 2024

What, How & Why?

Fixes #7530
We should also check that right column key is changed when checking a backlink column

☑️ ToDos

  • 📝 Changelog update
  • 🚦 Tests (or not relevant)
  • C-API, if public C++ API changed
  • bindgen/spec.yml, if public C++ API changed

@jedelbo
Copy link
Contributor Author

jedelbo commented Aug 16, 2024

@papafe if you feel for it, you may want to check is this fixes the problem.

@coveralls-official
Copy link

Pull Request Test Coverage Report for Build jorgen.edelbo_396

Details

  • 42 of 42 (100.0%) changed or added relevant lines in 3 files are covered.
  • 74 unchanged lines in 19 files lost coverage.
  • Overall coverage increased (+0.004%) to 91.112%

Files with Coverage Reduction New Missed Lines %
src/realm/dictionary.cpp 1 85.16%
src/realm/index_string.cpp 1 85.1%
src/realm/mixed.cpp 1 86.75%
src/realm/sync/noinst/server/server_history.cpp 1 62.92%
src/realm/util/serializer.cpp 1 90.43%
test/test_index_string.cpp 1 93.48%
src/realm/array_blobs_big.cpp 2 98.58%
src/realm/query_expression.hpp 2 93.81%
src/realm/collection_parent.cpp 3 93.08%
src/realm/sync/instruction_replication.cpp 3 91.8%
Totals Coverage Status
Change from base Build 2567: 0.004%
Covered Lines: 217408
Relevant Lines: 238617

💛 - Coveralls

Copy link
Member

@nicola-cab nicola-cab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great fix!

@jedelbo jedelbo merged commit 13273f0 into master Aug 16, 2024
@jedelbo jedelbo deleted the je/keypath-wildcard branch August 16, 2024 09:24
@tgoyne
Copy link
Member

tgoyne commented Aug 30, 2024

This broke a pretty straightfoward Swift test:

    func testBacklinkPropertyKeyPathNotifications2() {
        let realm = try! Realm()
        realm.beginWrite()
        let person = realm.create(SwiftOwnerObject.self)
        let dog = realm.create(SwiftDogObject.self)
        person.dog = dog
        try! realm.commitWrite()

        // Expect no notification for "owners" when "owner.name" is changed
        let ex = expectation(description: "no change notification")
        let token = dog.observe(keyPaths: ["owners"], { _ in
            ex.fulfill()
        })
        try! realm.write {
            let owner = dog.owners.first!
            owner.name = "Tom"
        }
        waitForExpectations(timeout: 0.1, handler: nil)
        token.invalidate()
    }

This modification is now incorrectly producing a notification.

@jedelbo jedelbo mentioned this pull request Sep 3, 2024
4 tasks
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent depth of notification when using wildcard

4 participants