Reputation: 1042
I am trying to go through the example mention in the documentation for the HasAndBelongsToMany relations. Documentation
For the Assembly and Parts example, the documentation says, it adds a function which can add part to assembly.
assembly.parts.add(part,
function(err) {
...
});
But this adds only a single part to assembly. If I have to add multiple parts, do we have a function for that? I think calling this function in a loop multiple times is not an optimal way to do.
Upvotes: 0
Views: 109