as it is known mongo modifies the name of the tables, if you specify the name table it will be converted into a plural - tables

I have a history essence and an amazing thing mongo transformed it according to the rules into histories

but for some reason refused to write data to it:

 var data = { id: 1, name: "user1", value: 10 } var modelHistory = mongoose.model('Hystory', myShema), table = new modelHistory(data) table.save(function(err) { err && console.log(err); }); 

after renaming the model it all worked:

 var modelHistory = mongoose.model('Hyst', myShema), 

Do I understand correctly that монго does not work correctly with исключениями in English?

    1 answer 1

    No, you get it wrong. MongoDB itself does not change the name of the collection - the problem is in using the Mongoose JS module. In addition to the bug with the renaming of collections (or features, which side to look at), this module also has some not quite obvious features. More it was described in this article on Habré