Draft implementation for inferring type for a hasMany relationship