Edit Page

Records

In Sails, records come from model methods like .find() and represent data from your database. You can work with records just like you would any other data.

var orders = await Order.find();
// `orders` is an array of records

Working with populated records

#

If a record came from a query that used .populate(), it may contain populated values (or "child records") which represent the associated data. To add, remove, or replace these child records, use model methods.

Is something missing?

If you notice something we've missed or could be improved on, please follow this link and submit a pull request to the sails repo. Once we merge it, the changes will be reflected on the website the next time it is deployed.

Reference

Reference