Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@Voxera you have any idea what the issue might be? I can send the snaps of code and my collections. I went through the code a couple of times looking for typos but couldn't find one.
-
JhonDoe28185ythere is no such thing. look at your models and your queries. maybe the answer lies there
-
@JhonDoe I went through my models, my schema and everything it is exactly the same as my other collections but still I didn't get the expected results
-
I figured out the mistake, the name of collection must be in different from the name we are referring in our API. For instance in my 'surprise' API was referring to 'surprise' collection but when I changed my collection name to 'surprises' it started working fine
-
JhonDoe28185yyou shouldn't be doing that unless you are not using mongoose or another ORM, or you are using the orm in a strange way
Related Rants
I am using MERN to develop a poll app. I have 6 collections in my database. I have an API for each collection, 4 of those API returns the data whereas the other 2 return 'undefined'. What is the issue I am facing? Is MongoDB not allowing me to use more than 4 collections?
question
help please
nodejs
doubt
reactjs
mongodb
expressjs