strongloop/loopback-datasource-juggler — pull request #356 by clarkorz (2014-11-20 11:35:23+00:00)
Title: Allow hasOne relation to have a scope option

So a model could dynamically have one target model.

E.g.: A question have many answers, but it could only have one best answer. With this PR, we could just update the answer with a `{best:true}` flag, and define a hasOne relation with scope `{where:{best:true}}`.

Signed-off-by: Clark Wang