Resolve sync conflicts in ember-pouch


#1

Hello,

I’m working on a project which needs offline capabilities and I’m evaluating different setups. I tried ember-pouch and I’m amazed how simple the setup is to work offline and later sync the data to the server. But for conflicts resolution I did not find a simple solution. Ember-pouch solves conflicts silently and loads only winning revisions. But in my scenario I would like to resolve conflicts manually. Unfortunately I only found a solution to fetch conflicts and loosing revisions manually:

db.get('docid', {conflicts: true}).then((winningDoc) => {
  db.get('docid', {rev: winningDoc._conflicts[0]}).then((loosingDoc) => {...});
});

A big disadvantage is that with this solution every model has to fetch its conflicts separately. Is there a direct way to load conflict information from the model? If someone already solved this problem I would be happy to learn a better way to deal with conflicts in ember-pouch.

Many thanks in advance…