realm-core icon indicating copy to clipboard operation
realm-core copied to clipboard

No notification for write transaction that contains only change to backlink property

Open ejm01 opened this issue 4 years ago • 2 comments

Expected results

A write transaction that contains only a change to a backlink property notifies.

Actual Results

A write transaction that contains only a change to a backlink property does not notify.

Steps & Code to Reproduce

Test reproduction in realm-core. The difference between this test and the previous passing test is that the previous test both creates an object and reassigns the backlink property.

How to reproduce with realm-cocoa.

Core version

Core version: 11.4.1

After looking at the TransactLogParser I think the issue might be that only switch cases that add modifications to changeset are hit when the write transaction contains only a change to the linkingObjects property. But changes to linking objects are represented by insertions.

So some questions:

  1. Is this actually the case? And an issue?
  2. Would the solution be changing the TransactLogParser?
  3. Would the solution be changing realm-core treats a change to a linkingObject property?
  4. Any other ways?

ejm01 avatar Oct 26 '21 14:10 ejm01

I've attached an example that uses Realm-Swift and valuePublisher that shows a short example of this issue happening. Hopefully it helps.

Example.zip

connor-ricks avatar Jan 06 '22 17:01 connor-ricks

@pavel-ship-it @ericjordanmossman any updates on this issue being addressed?

This is related to these issues 7493 7591 7684

connor-ricks avatar Aug 04 '22 03:08 connor-ricks

I am going to have a look at this issue.

nicola-cab avatar Nov 21 '22 18:11 nicola-cab