strongloop/loopback-datasource-juggler — pull request #172 by fabien (2014-07-11 13:35:08+00:00)
Title: RelationDefinition applyScope/applyMapping

Add the ability to set static/dynamic filtering (where, order, limit, skip, fields …) and property mapping/transfer (de-normalization) for hasMany/hasOne. This enables LoopBack beforeRemote handlers to dynamically change the relation scope. See the comment in the tests for the rationale.

Based upon this, it should be easy to create a public method to set this scope on the instance-level (`setScope({ ... })`).