strongloop/loopback-datasource-juggler — pull request #295 by fabien (2014-09-07 11:28:17+00:00)
Title: Various improvements to embedded relations

Both embedsOne and embedsMany now support the option `persistent: true`, which will save the embedded model itself as usual, and subsequently embeds it on the relation. Of course this is only supported for embedded models that are attached to an appropriate datasource (unlike Transient).

In addition, if an embedsOne relation has it's `id` property specified as `generated: true`, and its datasource (connector) supports a `generatedId` method, it will be used to assign a (usually random or UUID-like) id.