bredikhin / barrels

Simple DB Fixtures for Sails.js
MIT License
85 stars 34 forks source link

should disable auto associations explicitly #21

Closed everdance closed 9 years ago

everdance commented 9 years ago

When required associations exist, need pass false explicitly to disable auto association. Could you consider make a change so that auto association is disabled by default when first parameter for populate method is an array.

bredikhin commented 9 years ago

Not sure I'm getting the idea behind this PR.

everdance commented 9 years ago

Hi Bredikhin, this merge request just want to correct the demo code on your README populate method example on autoAssociation flag

As a better improvement, I would suggest that you change the fingerprint of populate method, so that when first parameter is an array, this is required association scenario call, and we should disable autoAssociation implicitly so user don't need to pass this flag.

bredikhin commented 9 years ago

Actually, the idea of this example is that you can use automatic association feature once the required models are populated, so, sorry, a little miss on this one.