Is it possible to define an array of objects ? From what I've read, I only have 2 options:
Create a Phone model and do a one to many association between the User model and the Phone model: I'm not really interested in this solution however, as I'm not planning to search by phone number, and wouldn't want to have a specific table in my db just to store phone numbers...
Define the phone_numbers attribute as type: 'array' and validate its structure by writing some code in a beforeUpdate hook
Am I right and do I have only these 2 options above available or is there a way to define an array type with a proper structure ?
this repo is for issues regard waterline documentation, I think you should get an answer if you post your question (which is not an issue) on stackoverflow
Hi,
I'd like to define something along these lines:
but this code doesn't work in Sails.
Is it possible to define an array of objects ? From what I've read, I only have 2 options:
Am I right and do I have only these 2 options above available or is there a way to define an array type with a proper structure ?
Thank you.