These are chat archives for Automattic/mongoose

27th
Feb 2019
Nico R.
@nriesco
Feb 27 17:35

Hi,

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!