Reputation: 5207
what kind of schema data type should i use to define a list of numbers (or an array of numbers with changing size) I tried :
{type : [Number]}
but i suspect it may cause problems as i try to insert a value to the array (with $addToSet
) from nodejs nothing happens,although trying to do this from mongodb interactive shell works fine.. perhaps(most likely) it's a different problem but i would like to remove any doubts regarding the way i defined the schema.
Thank you.
Upvotes: 1
Views: 2314