@ Zolmeister is right. Sails only supports the following types of model attributes
string, text, integer, float, date, time, datetime, boolean, binary, array, json
They also do not support associations (which would otherwise be useful in this case)
GitHub Issue No. 124 .
You can get around this bypassing sails and using your own Mongo methods:
Model.native(function(err, collection){
collection.find({'query': 'here'}).done(function(error, docs) {
});
});
, - . , ( ObjectIds, pubsub ..).