public function hasMany($name, $to, $config = []) {
        $defaults = [
            'to'       => $to,
            'relation' => 'hasMany'
        ];
        $config += $defaults;
        return $this->bind($name, $config);
    }
public function hasMany($name, $to, $config = []) {
        $defaults = [
            'to'       => $to,
            'relation' => 'hasMany'
        ];
        $config += $defaults;
        return $this->bind($name, $config);
    }
public function hasMany ( $ name , $ to , $ config = [ ] ) { $ defaults = [ 'to' => $ to , 'relation' => 'hasMany' ] ; $ config += $ defaults ; return $ this -> bind ( $ name , $ config ) ; }
Sets a hasMany relation.

@param  string  $name   The name of the relation (i.e. field name where it will be binded).
@param  string  $to     The document class name to bind.
@param  array   $config The configuration that should be specified in the relationship.
See the `Relationship` class for more information.
@return boolean
Sets a hasMany relation .