strongloop/loopback-datasource-juggler — pull request #358 by clarkorz (2014-11-24 11:32:22+00:00)
Title: fix recursive calls if create belongsTo model in beforeCreate hook

`BelongsTo.prototype.create` will call `modelInstance.save()` after `modelTo` has been created. If this behavior happens in `ModelFrom.beforeCreate`, it will create a recursive loop.

But this fix might break something. See the test I altered.

Note: if `BelongsTo.prototype.create` is called in `ModelFrom.beforeUpdate()`, the model will be update twice (harmless I think)

Signed-off-by: Clark Wang