HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Is findOne() in mongoDB deprecated

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
findonemongodbdeprecated

Problem

Is findOne() in MongoDB deprecated? I am asking this because when I use findOne() in WebStorm the IDE puts a line through findOne() and gives a message saying findOne() is deprecated and to find substitute.

I looked in the MongoDB documentation to try and find an answer but it did not mention anything about findOne() being deprecated.

If findOne() is deprecated what would be the best alternative to this method?

If it is not deprecated does anyone know why WebStorm gives this warning?

Any help with this is appreciated! Thanks!

Solution

Just got an answer from the maintainer of the nodejs driver, deprecation has been removed!

Context

StackExchange Database Administrators Q#139307, answer score: 5

Revisions (0)

No revisions yet.