Open dcheli opened 2 months ago
Also, I'm using "@nozbe/watermelondb": "^0.27.1",
It is not expected behavior. Are you syncing your records or resolving syncs in some way?
If you only use Watermelon as a local database, destroy records permanently, if you synchronize, mark as deleted instead.
await somePost.markAsDeleted() // syncable await somePost.destroyPermanently() // permanent
Thanks for the response and confirming that this is not expected behavior. I am not currently syncing my records, but that is the long term , well, in the next few months, hence I'm using markAsDeleted(). What seems to work rather then using the find(), is to just use:
.query(Q.where('my_field_id', someid))
If the record doesn't exist, it returns an empty array.
I recently discovered that if I execute a find() on a record collection using an id for a record that has been previously deleted with markAsDeleted(), the query will return the record.
for example:
const goal = await goalCollection.find(goalActivity.goal.id);
will return a previously deleted goal. I have 2 questions about this: