teddyzeenny / ember-data-factory

92 stars 8 forks source link

Enable hasMany attributes on a factory while preventing infinite loops #1

Closed sheldonbaker closed 11 years ago

sheldonbaker commented 11 years ago

Basically just copied the pattern used in the if(isBelongsTo(meta)) block, but avoided infinite loops by passing along null as the child's 'parent' attribute, and checking for null on subsequent calls to generate.

sheldonbaker commented 11 years ago

Did a bit more testing and found some other issues. Will re-submit if I figure them out.