meanstacktutorial icon indicating copy to clipboard operation
meanstacktutorial copied to clipboard

Odd Issue with ObjectID in mongodb with this app

Open brownsmart opened this issue 9 years ago • 0 comments

Hi, on going through this tutorial i noticed i was unable to edit or remove records using the form. I noticed that the "_id" in the database stopped outputing as e.g. "5580044347a980ac25c9cb01" and started to display as "_id" : ObjectId("5580048c47a980ac25c9cb04") instead for new records.

Is there a difference between the records inserting via the console and the form? as it seems the data is entered with this ObjectId text.

noticed that this is added in the app.put command on line 48 .. or am I looking at this wrong?

Also in the end i deleted all the manual entries and re-added using the form, this seems to work ok, but I am just thinking if I was to use such a method in future projects this would cause a problem if data was to be entered in different ways.

Thanks.

brownsmart avatar Jun 16 '15 11:06 brownsmart