teddyzeenny/ember-data-factory — pull request #1 by sheldonnbbaker (2013-06-11 00:36:50+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`.