Closed augnustin closed 8 years ago
Hi, thanks for the issue. Is the data you are operating on created before v0.2.0? Before then, the _id field was not written to disk.
However, to be sure I created a new react project to test with this test code and got this output which shows that removing by the _id field works.
If your data is created before v0.2.0, it just needs to be re-added to the database to have a _id field. Something like this should work:
this.model = await reactNativeStore.model("link");
var all_data = this.model.remove();
for(var i in all_data) {
this.model.add(all_data[i]);
}
Now we had api removeById, you can use this api to remove data by id.
Hi there,
Great lib! I can't make the
remove
method work with a filter though.Since it is not in your test suite either, I can't make myself confortable it actually works.