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
As you can see when checking for duplicate emails we gave it an option withDeleted: true, the intention is clear, we don't want duplicate emails even if they're deleted but the thing is the final db query becomes like this:
there fore the above query will always be false because the emails registerd in our database don't have the property set to true by default. so this will give result of false even if we have an email: example@mail.com
the reason is when we first register with the email: example@mail.com the deleted property is false. but the above query is looking for emails with the deleted property true there for allowing for duplicate emails.
The text was updated successfully, but these errors were encountered:
As you can see when checking for duplicate emails we gave it an option withDeleted: true, the intention is clear, we don't want duplicate emails even if they're deleted but the thing is the final db query becomes like this:
{"email":{"$regex": /\bexample@mail.com\b/,"$options":"i"},"deleted":true}
there fore the above query will always be false because the emails registerd in our database don't have the property set to true by default. so this will give result of false even if we have an email: example@mail.com
the reason is when we first register with the email: example@mail.com the deleted property is false. but the above query is looking for emails with the deleted property true there for allowing for duplicate emails.
The text was updated successfully, but these errors were encountered: