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

Missing notification for backlink #7674

Closed
papafe opened this issue May 3, 2024 · 3 comments
Closed

Missing notification for backlink #7674

papafe opened this issue May 3, 2024 · 3 comments
Labels
Waiting-For-Reporter Waiting for more information from the reporter before we can proceed

Comments

@papafe
Copy link
Contributor

papafe commented May 3, 2024

It seems notifications for backlinks are not being raised. I have got the following .NET test:

  [Test]
  public void ABackLinkTest()
  {
      var testObject = new TestNotificationObject();
      _realm.Write(() => _realm.Add(testObject));
      var notificationCount = 0;

      testObject.PropertyChanged += (sender, e) =>
      {
          notificationCount++;
      };
      Assert.That(testObject.Backlink.Count, Is.EqualTo(0));

      _realm.Write(() =>
      {
          var newTestOb = new TestNotificationObject();
          newTestOb.LinkSameType = testObject;
          _realm.Add(newTestOb);
      });
      _realm.Refresh();
      Assert.That(testObject.Backlink.Count, Is.EqualTo(1));
      Assert.That(notificationCount, Is.EqualTo(1));
  }

(https://github.com/realm/realm-dotnet/blob/6c5e5bdfd0fcc720aa7c8469612de1cb29619a68/Tests/Realm.Tests/Database/NotificationTests.cs#L209-L231)

The test fails at the last assertion (the first empty notification is swallowed up). I’ve tried both by passing a null keypath array or just the backlink property, but the result is the same. I can see that the notifications is raised in core, but it’s practically empty (no columns, no add/delete/.. indexes).
I've managed to reproduce this also in js and dart.

Copy link

sync-by-unito bot commented May 3, 2024

➤ PM Bot commented:

Jira ticket: RCORE-2114

@jedelbo
Copy link
Contributor

jedelbo commented Aug 15, 2024

@papafe if you can provide the reproduction case in js, I can try to look into it.

@sync-by-unito sync-by-unito bot added the Waiting-For-Reporter Waiting for more information from the reporter before we can proceed label Aug 15, 2024
@jedelbo
Copy link
Contributor

jedelbo commented Sep 20, 2024

This could very well be fixed by #7987

@jedelbo jedelbo closed this as completed Sep 20, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Waiting-For-Reporter Waiting for more information from the reporter before we can proceed
Projects
None yet
Development

No branches or pull requests

2 participants