📜 Description
Query results exclude documents where the "deleted" field is set to false. This issue seems to have arisen following the commit, which introduced new pre-hook logic that specifies deleted: { $exists: false }.
I have not been able to find any migration scripts designed to remove the "deleted" field, which may help mitigate this concern. I would appreciate guidance on where to find the relevant migration scripts or recommendations for addressing this issue.
👟 Reproduction steps
- Query notifications from the Message repository
- Observe that documents with
deleted: false are not returned
👍 Expected behavior
Queries should return all non-deleted messages, including those where deleted is explicitly set to false.
👎 Actual Behavior with Screenshots
Documents with deleted: false are excluded from query results due to the deleted: { $exists: false } condition.
Novu version
3.12.0
npm version
10.8.2
node version
20.19.0
📃 Provide any additional context for the Bug.
No response
👀 Have you spent some time to check if this bug has been raised before?
🏢 Have you read the Contributing Guidelines?
Are you willing to submit PR?
None
📜 Description
Query results exclude documents where the "deleted" field is set to false. This issue seems to have arisen following the commit, which introduced new pre-hook logic that specifies
deleted: { $exists: false }.I have not been able to find any migration scripts designed to remove the "deleted" field, which may help mitigate this concern. I would appreciate guidance on where to find the relevant migration scripts or recommendations for addressing this issue.
👟 Reproduction steps
deleted: falseare not returned👍 Expected behavior
Queries should return all non-deleted messages, including those where deleted is explicitly set to false.
👎 Actual Behavior with Screenshots
Documents with
deleted: falseare excluded from query results due to thedeleted: { $exists: false }condition.Novu version
3.12.0
npm version
10.8.2
node version
20.19.0
📃 Provide any additional context for the Bug.
No response
👀 Have you spent some time to check if this bug has been raised before?
🏢 Have you read the Contributing Guidelines?
Are you willing to submit PR?
None