sdepold/sequelize-doc — pull request #20 by fzaninotto (2013-01-05 22:05:34+00:00)
Title: Add documentation about association prefetching in queries

I found this neat feature in the code and Changelog, but it was nowhere to be found in the doc... So I documented it.

```js
// Sequelize v1.6.0 introduced prefetching of related objects for find()
// and findAll(), using the new include query operator.
//Here is how to fetch a phone numbers and its owner in one query:
PhoneNumber.find({ where: { id: 123 }, include: ['Person'] }).success(function(phoneNumber) {
// now instead of using the getPerson() asynchronous accessor
// you can access the `person` property directly, ans synchronously
console.log(phoneNumber.person.firstName);
})
```