strongloop/loopback-datasource-juggler — pull request #371 by clarkorz (2014-12-11 07:32:59+00:00)
Title: fix default include in default scope fails findById

If there is an include option in default scope, `findById()` will complaint:

> Relation "things" is not defined for Thing model

I think it's because the default scope is applied twice, the first is in `byIdQuery()` which is called by `findById()`, the second is in `find()`. This will cause `mergeQuery()` to nest the include option.

Signed-off-by: Clark Wang