bredikhin / barrels

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

Load collection in series to accommodate required associations. #39

Closed marnusw closed 8 years ago

marnusw commented 8 years ago

When using some Waterline adapters the fixtures are populated out of order even if a load order is provided due to the use of async.each, resulting in error messages such as

Invalid attributes sent to Passport:
 • user
   • "required" validation rule failed for input: null

This fixes the issue by switching to async.eachSeries. See #31 for further discussion.

bredikhin commented 8 years ago

Thanks for spotting and fixing, great job!