Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for RealmObject.getBacklinks #1483

Merged
merged 3 commits into from
Jan 25, 2024
Merged

Add support for RealmObject.getBacklinks #1483

merged 3 commits into from
Jan 25, 2024

Conversation

nirinchev
Copy link
Member

@nirinchev nirinchev commented Jan 23, 2024

Per the title - it allows users to find backlinks regardless of whether they've defined a computed property in their models explicitly. The only thing I'm uncertain about is whether we want to put it on the RealmObject as it's polluting the interface a little for what is arguably niche functionality.

Fixes #1480

isA<RealmResultsChanges<Source>>().having((ch) => ch.inserted, 'inserted', [0]),
isA<RealmResultsChanges<Source>>().having((ch) => ch.inserted, 'inserted', [1]),
isA<RealmResultsChanges<Source>>() //
.having((ch) => ch.inserted, 'inserted', [0, 2]) // is this surprising?
Copy link
Contributor

Choose a reason for hiding this comment

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

That backlinks does not have a "natural" order, you mean?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, I copied the test, so didn't take a look at the comment. I can remove it.

Copy link
Contributor

Choose a reason for hiding this comment

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

.. My own comment I see 😊

Copy link

coveralls-official bot commented Jan 23, 2024

Pull Request Test Coverage Report for Build 7626920105

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 87.3%

Totals Coverage Status
Change from base Build 7625186129: 0.0%
Covered Lines: 3719
Relevant Lines: 4260

💛 - Coveralls

@nirinchev nirinchev merged commit 7e34d0d into main Jan 25, 2024
48 of 49 checks passed
@nirinchev nirinchev deleted the ni/get-backlinks branch January 25, 2024 12:40
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a linkingObjects method to RealmObject in the Flutter SDK
2 participants