strongloop/loopback-datasource-juggler — pull request #213 by fabien (2014-08-13 09:52:19+00:00)
Title: Implement scope.defineMethod/relation.defineMethod

This allows one to easily add custom scope/relation methods, defined in a mixin for example.

All relation definition methods (hasMany, belongsTo) now return the definition, for further configuration.

Finally, a new relation method `fetch` was introduced to help access the relation's models easily (from a custom method for example - see the tests).