final public function intersectWith(Collection $collection, $sourceColumnName, $targetColumnName, $columnsToPullUp = [], $autoHydrate = false)
    {
        $collection->isIntersection = true;
        $collectionJoin = new CollectionJoin($collection, $sourceColumnName, $targetColumnName, $columnsToPullUp, $autoHydrate, CollectionJoin::JOIN_TYPE_INTERSECTION);
        $this->intersections[] = $collectionJoin;
        return $this->prepareCollectionJoin($collectionJoin);
    }
final public function intersectWith(Collection $collection, $sourceColumnName, $targetColumnName, $columnsToPullUp = [], $autoHydrate = false)
    {
        $collection->isIntersection = true;
        $collectionJoin = new CollectionJoin($collection, $sourceColumnName, $targetColumnName, $columnsToPullUp, $autoHydrate, CollectionJoin::JOIN_TYPE_INTERSECTION);
        $this->intersections[] = $collectionJoin;
        return $this->prepareCollectionJoin($collectionJoin);
    }
final public function intersectWith ( Collection $ collection , $ sourceColumnName , $ targetColumnName , $ columnsToPullUp = [ ] , $ autoHydrate = false ) { $ collection -> isIntersection = true ; $ collectionJoin = new CollectionJoin ( $ collection , $ sourceColumnName , $ targetColumnName , $ columnsToPullUp , $ autoHydrate , CollectionJoin :: JOIN_TYPE_INTERSECTION ) ; $ this -> intersections [ ] = $ collectionJoin ; return $ this -> prepareCollectionJoin ( $ collectionJoin ) ; }
Create an intersection with a second collection.

Only rows found where the value of $sourceColumnName is found in $intersectedColumnName of
$collection will remain in this collection.

Not that if the collection contains aggregate columns but isn't yet grouped, we will automatically
add a group to the collection using the $intersectedColumnName

@param Collection $collection The collection to intersect with
@param string $sourceColumnName The name of the column in the parent collection to intersect using.
@param string $targetColumnName The name of the column in the child collection to intersect using
@param string[] $columnsToPullUp An array of column names in the intersected 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
repository will be unavoidable.
@return $this
Create an intersection with a second collection .