public function joinWith(Collection $collection, $sourceColumnName, $targetColumnName, $columnsToPullUp = [], $autoHydrate = false)
    {
        $collectionJoin = new CollectionJoin($collection, $sourceColumnName, $targetColumnName, $columnsToPullUp, $autoHydrate, CollectionJoin::JOIN_TYPE_ATTACH);
        $this->intersections[] = $collectionJoin;
        return $this->prepareCollectionJoin($collectionJoin);
    }
public function joinWith(Collection $collection, $sourceColumnName, $targetColumnName, $columnsToPullUp = [], $autoHydrate = false)
    {
        $collectionJoin = new CollectionJoin($collection, $sourceColumnName, $targetColumnName, $columnsToPullUp, $autoHydrate, CollectionJoin::JOIN_TYPE_ATTACH);
        $this->intersections[] = $collectionJoin;
        return $this->prepareCollectionJoin($collectionJoin);
    }
public function joinWith ( Collection $ collection , $ sourceColumnName , $ targetColumnName , $ columnsToPullUp = [ ] , $ autoHydrate = false ) { $ collectionJoin = new CollectionJoin ( $ collection , $ sourceColumnName , $ targetColumnName , $ columnsToPullUp , $ autoHydrate , CollectionJoin :: JOIN_TYPE_ATTACH ) ; $ this -> intersections [ ] = $ collectionJoin ; return $ this -> prepareCollectionJoin ( $ collectionJoin ) ; }
Join a collection on to our parent collection

All rows from our parent collection remain, and, where the value of $sourceColumnName equals the
value of $targetColumnName, the rows from the child collection will be attached. If there is no match
blank values will be joined.

@param Collection $collection The child collection
@param string $sourceColumnName The name of the column in the parent collection to attach using
@param string $targetColumnName The name of the column in the child collection to attach using
@param array $columnsToPullUp An array of column names in the child collection to copy upwards
into the rows of the parent collection.
@param bool $autoHydrate A hint that you want to auto hydrate this relationship. Auto hydration ensures that
the data in the intersected repository are loaded and ready for use by modelling.
If your repository supports it this is often very efficient if you will need this
data when processing the collection. Without auto hydration secondary hits on the
@return Collection
Join a collection on to our parent collection