about 11 years ago
We usually have this kind of error while making query with mongodb "Uncaught exception 'MongoException' with message 'Invalid object ID'" , the main reason behind this kind of error is that :->
a) Id string for mongodb must be 24 hexadecimal characters. If an invalid string is passed to this constructor, the constructor will ignore it and create a new id value.
Thus to solve this kind of error we can try something like this :
0 Comment(s)