strongloop/loopback-datasource-juggler — pull request #219 by fabien (2014-08-15 09:31:45+00:00)
Title: Fixed BelongsTo.prototype.create, clarified tests

Fixed BelongsTo.prototype.create - although the foreignKey was set on
the model instance, it was never actually persisted, unless you'd issue a
separate call to save the 'parent' model.

Added clarified test-case based on previous documentation example.

Turned out that there was an inconsistency with belongsTo relations
and how properties were transferred in that particular case. Normally,
properties are transferred from parent to child, but there are cases
where it makes sense to do the opposite. This was the case
with the advanced example, and to enable this, a new option:
`invertProperties` was introduced.