问题
In my case fetching data from two collection usind one id to use another id data not coming properly.
回答1:
You can use the associations in the Sails.js v0.10. npm install sails@git://github.com/balderdashy/sails.git#v0.10
For the Mongo-db
npm install sails-mongo@git://github.com/balderdashy/sails-mongo.git#v0.10
and here is the documentation.. https://github.com/balderdashy/sails-docs/blob/master/reference/ModelAssociations.md
来源:https://stackoverflow.com/questions/21545142/how-to-use-association-in-sails-js-mongodb