Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

findOne accepts a string as input #4378

Closed
alexisabril opened this issue Jul 29, 2016 · 1 comment
Closed

findOne accepts a string as input #4378

alexisabril opened this issue Jul 29, 2016 · 1 comment
Milestone

Comments

@alexisabril
Copy link

Subtle issue caught me today, but the following query returns the initial record in the db:

SomeModel.findOne('').exec()

I would expect the above to throw an error akin to a native query. I'll follow up upon digging in further!

@dfilipidisz
Copy link

I can confirm, caused some confusion today (but on the positive side found an erroneous query)

@vkarpov15 vkarpov15 added this to the 4.5.9 milestone Jul 31, 2016
vkarpov15 added a commit that referenced this issue Aug 7, 2016
vkarpov15 added a commit that referenced this issue Dec 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants