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

Backlinks getters throws for unmanaged objects #1293

Merged
merged 26 commits into from
Jun 20, 2023

Conversation

desistefanova
Copy link
Contributor

@desistefanova desistefanova commented May 29, 2023

Using backlinks is only possible for managed(persisted) objects.
Fixes #1106
Fix test: "Realm.open (flexibleSync) - listen for download progress on an empty realm"

@coveralls
Copy link

coveralls commented May 29, 2023

Pull Request Test Coverage Report for Build 5254345158

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.09%) to 89.289%

Totals Coverage Status
Change from base Build 5212207263: 0.09%
Covered Lines: 3151
Relevant Lines: 3529

💛 - Coveralls

@desistefanova desistefanova marked this pull request as ready for review May 30, 2023 06:28
Copy link
Contributor

@nielsenko nielsenko left a comment

Choose a reason for hiding this comment

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

We should not change the output of the generator for this in my opinion. This should be handled in the accessor.

@desistefanova
Copy link
Contributor Author

We should not change the output of the generator for this in my opinion. This should be handled in the accessor.

How could we know in the accessor that this is a backlink?

Copy link
Contributor

@nielsenko nielsenko left a comment

Choose a reason for hiding this comment

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

You are right about not being able to do this in the accessor with the current design.

Copy link
Contributor

@blagoev blagoev left a comment

Choose a reason for hiding this comment

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

.NET throws an exception. Why are we diverging on this?

desistefanova and others added 2 commits May 31, 2023 16:02
Co-authored-by: Kasper Overgård Nielsen <kasper.nielsen@mongodb.com>
@desistefanova
Copy link
Contributor Author

.NET throws an exception. Why are we diverging on this?

We have an user request with a reasonable argument: #1106 (comment)

@desistefanova desistefanova marked this pull request as draft June 4, 2023 07:39
@desistefanova desistefanova changed the title Unmanaged Empty Backlinks Backlinks getters throws for unmanaged objects Jun 4, 2023
@desistefanova desistefanova marked this pull request as ready for review June 4, 2023 15:30
Copy link
Contributor

@nielsenko nielsenko left a comment

Choose a reason for hiding this comment

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

Missing the changes to RealmGenerator

lib/src/realm_object.dart Outdated Show resolved Hide resolved
generator/lib/src/realm_field_info.dart Outdated Show resolved Hide resolved
test/backlinks_test.dart Outdated Show resolved Hide resolved
test/realm_test.dart Outdated Show resolved Hide resolved
generator/lib/src/realm_field_info.dart Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
test/backlinks_test.dart Outdated Show resolved Hide resolved
generator/lib/src/realm_field_info.dart Outdated Show resolved Hide resolved
desistefanova and others added 4 commits June 13, 2023 11:38
Co-authored-by: blagoev <lubo@blagoev.com>
Co-authored-by: blagoev <lubo@blagoev.com>
Copy link
Contributor

@nielsenko nielsenko left a comment

Choose a reason for hiding this comment

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

Okay

@desistefanova desistefanova merged commit 3597089 into main Jun 20, 2023
@desistefanova desistefanova deleted the ds/unmanaged_backlinks branch June 20, 2023 13:55
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error occurs when a backlink iterable is empty
4 participants