Fix $hasMany relationships