I am just stucked in a problem, a great thanks in advance. I am working in spring mvc application, that works good on local host but after deployment when I hit a get request for fetching some mongo data it returns null. I double checked the mongo db, it is same as in localhost and in server, version is also same and when I am executing the query on mongo shell and I got data. I am confused why the get request is not working if data is present and query generated in get request is same as we execute in mongo shell.
The query generated in system.profile is :
"$and" : [{"batchId" : {"$eq":"56d54d4e975a318a8d98a10a"}},{"date" : {"$eq" : ISODate("2017-05-09T07:00:00Z")}},{"userType" : {"$eq" : 1}}]
While the query I excuted in shell is:
db.attendance.find({ "$and" : [{"batchId" : {"$eq":"56d54d4e975a318a8d98a10a"}},{"date" : {"$eq" : ISODate("2017-05-09T07:00:00Z")}},{"userType" : {"$eq" : 1}}]})