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