strongloop/loopback-datasource-juggler — pull request #163 by lchenay (2014-07-03 13:20:19+00:00)
Title: Allow to set collect key from relation definition.

This is needed when declaring a relation hasManyThrough from and to the same classe.

Exemple:
2 class Profile and Follow

Follow have 2 columns: followingId, followeeId
```
app.models.profile.hasMany(app.models.profile, {
through: app.models.follow,
as: 'followers',
foreignKey: 'followerId',
collect: 'follower'
});

app.models.profile.hasMany(app.models.profile, {
through: app.models.follow,
as: 'followees',
foreignKey: 'followeeId',
collect: 'followee'
});
```