sdepold/sequelize — pull request #132 by skystrife (2012-03-06 02:59:34+00:00)
Title: Fix bug with multiple belongsTo associations referring to the same table.

If specifying an "as" in the options, use that as the associationAccessor
instead of the table name to prevent being overridden.

What was happening before was that the association would be overwritten in this example:

```javascript
Question.belongsTo(User, {
as: 'Asker',
foreignKey: 'asker_id'
});

Question.belongsTo(User, {
as: 'Answerer',
foreignKey: 'answerer_id'
});
```

q#getAsker() would say that the method was not defined, since the injection would only add a q#getAnswerer() since the relation as 'Asker' was dropped.