jacksonjude / cloudkit_flutter

CloudKit support for Flutter via CloudKit Web Services.
https://pub.dev/packages/cloudkit_flutter
BSD 3-Clause "New" or "Revised" License
9 stars 4 forks source link

Bug: Adding, deleting, and adding a child record causes "leaky" record reference in the parent record #6

Closed deeje closed 1 year ago

deeje commented 1 year ago

Steps to reproduce (in Um Yang):

  1. Add a person

  2. Add a promotion
  3. Delete the promotion
  4. Add a promotion

Expected result: in CloudKit console, person should have 1 participation and 1 promotion record.



Actual result: person has 2 participation and 2 promotion records. one of each points to child records that no longer exist. So the child records are being deleted, but the references are not, even though I am doing that locally.

It seems like the local record keeps sending old references up to cloudkit when saving, like they aren’t being cleared out after delete, even thought I am explicitly doing so.

Related perhaps? Clearing out the references on CloudKit dashboard does not clear them out locally either.

deeje commented 1 year ago

fixed https://github.com/jacksonjude/cloudkit_flutter/commit/ece701a97e539781c4ae0a6790b99098cb3aec03