MongoHybrid\ResultSet::hasMany PHP Method

hasMany() public method

public hasMany ( $collections )
    public function hasMany($collections)
    {
        foreach ($this as &$doc) {
            if (isset($doc['_id'])) {
                foreach ($collections as $collection => $fkey) {
                    $doc[$collection] = $this->driver->find($collection, ['filter' => [$fkey => $doc['_id']]]);
                }
            }
        }
    }