strongloop/loopback-datasource-juggler — pull request #194 by fabien (2014-07-27 15:15:40+00:00)
Title: Embedded array of models: embedsMany

Transparently handle embedded array of models, with full hasMany API. Embedded models are validated (optional), and embedded ids are checked for uniqueness.

Note: LB should probably need an update to support the remoting API's for this.

Example:
```
Person.embedsMany(Address); // auto-generated numeric ids
Person.embedsMany(Address, { options: { autoId: false, validate: true } }); // user-provided ids (strings)

// by default, the accessor will be named: `singular` + List

Person.create({ name: 'Wilma' }, function(err, p) {
p.addressList.build({ id: 'home', street: 'Home' });
p.addressList.create({ id: 'work', street: 'Work' }, function(err, addr) {
console.log('Work Address:', addr);
});
});
```