sequelize/sequelize — pull request #840 by janmeier (2013-08-18 12:38:43+00:00)
Title: Specify attributes for eager loaded associations

With the test borrowed from #822 this allows you to specify what attributes to load for associations. As opposed to 822, this only loads the specified attributes from the DB, plus the primaryKeys. Primarykeys are needed because of this check: https://github.com/sequelize/sequelize/blob/master/lib/dialects/abstract/query.js#L327. I am not totally familiar with the eager loading code, so I don't know if that check is still needed, but i didn't want to remove it.

Closes #542