locked
Best way to sync a many to many table with composite key RRS feed

  • Question

  • I have a junction/ many to many table in my database. This table has 2 columns forming a composite primary key; userid & groupid.

    I'm having an issue where once a row is deleted it can never be re-added and synced again. For example:


    -user 123 is added to group 456

    -changes synchronized, upload direction. Row is added to remote.

    -user 123 removed from group 456 (row tombstoned in table meta and row removed from base table)

    -changes synchronized, upload direction. Row is removed on remote.

    -user 123 is added to group 456

    -changes synchronized, upload direction. Row is not inserted in remote.

    I'm guessing that the scope knowledge is retaining the fact that the row was once deleted and not syncing changes to it? Is this understanding correct? Is there anyway to clean this knowledge?

    Thanks in advance.

    Carl

    Tuesday, November 13, 2012 9:42 PM

All replies

  • can you try subscribing to ApplyChangeFailed event to see if it's firing an error or conflict...also you can use the PerformCleanup to manage your metadata...

    Tuesday, November 13, 2012 10:03 PM
  • JuneT

    yes, i'll try subscribing to that event and report back.

    Regarding PerformCleanup, doesn't that delete rows from the tracking tables, but retain information in the forgotten knowledge meta?

    thanks for your advice.

    Carl

    Wednesday, November 14, 2012 1:51 AM
  • when you reinsert user 123 to group 456, do you see what happens to its tracking table entry? on ChangesSelected event, does it even get selected?
    Wednesday, November 14, 2012 3:21 AM