-
Hi guys, I'm getting the following error when trying to work with the findOne() method:
Here's my code:
And here's my schema:
I'm almost certain it's a silly mistake from my end but just can't seem to figure out what it could be! Oh and i did run |
Beta Was this translation helpful? Give feedback.
Answered by
Inayat-C
Jun 18, 2020
Replies: 1 comment
-
.....and just as i suspected, it was a silly error from my part :). As stated in the docs, findOne() lets you find an item on the database that has a UNIQUE attribute. I was trying to find an email address record on my table which wasn't set to be unique. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Inayat-C
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
.....and just as i suspected, it was a silly error from my part :).
As stated in the docs, findOne() lets you find an item on the database that has a UNIQUE attribute. I was trying to find an email address record on my table which wasn't set to be unique.