You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I set the "name" field to "name1", click "save" - the result is 1 record in database with "name" set to "name1".
I set the "name" field to "name2", click "save" - the result is 2 records in database, first has "name" set to "name1", second has "name" set to "name2".
Now if I query for the documents I will have 2 documents, but I expect to have 1 document with the "name" set to "name2". How can I achieve this? Calling the delta-pouch's method all() is not convinient because if I have 1000 profiles in the database, and I need to get one by id, I need then to get all of them and then loop through the result.
If I run delta-pouch's method cleanup() - then I have 1 record in database with "name" set to "name1", so the result is no changes in the database made. But it is not what we expect.
So shortly our question is following:
Run db.save({_id: 'record1', title: 'test1'}).
Run db.save({$id: 'record1', title: 'title1 updated'}).
Is it possible to get the document by Id 'record1' without calling the all() method and then looping through the result?
Does the delta-pouch merges the records then (maybe using cron?) so we have 1 record in database with title "title1 updated"?
Thank you in advance,
Eugene
The text was updated successfully, but these errors were encountered:
Hello, Geoff.
First of all thanks for your project.
I have a couple of questions and hope that you will help us to continue using your module.
I am checking this example:
http://redgeoff.github.io/delta-pouch/examples/profile/?iris
Now if I query for the documents I will have 2 documents, but I expect to have 1 document with the "name" set to "name2". How can I achieve this? Calling the delta-pouch's method all() is not convinient because if I have 1000 profiles in the database, and I need to get one by id, I need then to get all of them and then loop through the result.
If I run delta-pouch's method cleanup() - then I have 1 record in database with "name" set to "name1", so the result is no changes in the database made. But it is not what we expect.
So shortly our question is following:
Is it possible to get the document by Id 'record1' without calling the all() method and then looping through the result?
Does the delta-pouch merges the records then (maybe using cron?) so we have 1 record in database with title "title1 updated"?
Thank you in advance,
Eugene
The text was updated successfully, but these errors were encountered: