azat-co / practicalnode

Practical Node.js, 1st and 2nd Editions [Apress] 📓
http://practicalnodebook.com
3.81k stars 693 forks source link

Mongoose is not ORM #19

Closed marcelorl closed 7 years ago

marcelorl commented 7 years ago

Mongoose is an ODM instead.

azat-co commented 7 years ago

@marcelorl where exactly did you see it? chapter? section numbers?

xmesaj2 commented 7 years ago

https://github.com/azat-co/practicalnode/search?utf8=%E2%9C%93&q=ORM&type=

I guess.

marcelorl commented 7 years ago

@xmesaj2 exactly.

@azat-co Mongoose is an ODM (Object Document Mapper).

mongodb is no relational. you dont create relationship between documents. of course you may have references to other documents, but you have to make sure they are right within the application's source code.