sequelize/sequelize — pull request #669 by spenceralger (2013-06-02 23:34:57+00:00)
Title: Added support for more explicit joins and table prefixed group by fields

I'm not sure how pull requests really work, but I just wanted to submit some minor modifications I made to the mysql query-generator.js.

I was trying to pull in sums of related records that are in a different table but the select queries support for joins and group by statements prevented me from doing so.

This adds a "join" option to select queries that works exactly like includes but doesn't actually include the models attributes in the query.

I've also added support for table prefixed group by fields. As grouping by id when you are joining another table requires the group by field be table-prefixed.