teddyzeenny/ember-data-factory — pull request #2 by sheldonnbbaker (2013-06-11 01:37:28+00:00)
Title: Enable hasMany attributes on a factory while preventing infinite loops

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`.