These are chat archives for Automattic/mongoose

Feb 2019
Nico R.
Feb 27 17:35


When declaring a property's type, I'm using [String] is that really different from []? What about when using other schemas like { type: otherSchema } or { type: [otherSchema]}?

What I currently use is this and it seems to work (both of them):

property1: { type: [String] },
property2: { type: [] },

I would really like to understand how Mongoose handles this, thanks!