<commit_before># Records

A record is a uniquely identifiable object that corresponds 1-to-1 with a database entry; e.g. a row in Oracle/MSSQL/PostgreSQL/MySQL, a document in MongoDB, or a hash in Redis.

```js
Order.findOne().exec(function (err, order){
  var record = order;
});
```

For the most part, records are just plain old JavaScript objects (aka POJOs) and should be treated that way.  You may customize the way that a record is _stringified_ by adding a [`customToJSON` method](http://sailsjs.com/documentation/concepts/models-and-orm/model-settings#?customtojson) to the settings for the record&rsquo;s model (for example, to have it always omit the `password` attribute when sending a record via [`res.json()`](http://sailsjs.com/documentation/reference/response-res/res-json).



<docmeta name="displayName" value="Records"><commit_msg>Remove some conceptual content that was moved to Concepts, and focus on how to work with records<commit_after># Records

In Sails, [records](http://sailsjs.com/documentation/concepts/models-and-orm/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.

```js
Order.find().exec(function (err, orders){
  // `orders` is an array of 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](http://sailsjs.com/documentation/reference/waterline-orm/models).


<docmeta name="displayName" value="Records">
{'fraction_non_alphanumeric': 0.11049382716049383, 'fraction_numerical': 0.0012345679012345679, 'mean_word_length': 5.003703703703704, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3732604', 'n_tokens_mistral': 471, 'n_tokens_neox': 444, 'n_words': 188}