src/Instruction/Relation/HasMany.php
private function oneProxyInThe(string $property): MapsProperty
    {
        if (null === $this->loader) {
            throw NoLoaderAvailable::whilstRequiredFor($this->class);
        }
        if (null === $this->container) {
            throw NoContainerAvailable::whilstRequiredFor($this->class);
        }
        try {
            return HasOneProxy::inProperty($property,
                ProxyFactory::fromThis(
                    SimpleHydrator::forThe($this->container),
                    $this->loader,
                    new PropertyUpdaterFactory
                )
            );
        } catch (CannotInstantiateThis $problem) {
            throw NoSuchClass::couldNotLoadCollection($this->container);
        }
    }
private function oneProxyInThe(string $property): MapsProperty
    {
        if (null === $this->loader) {
            throw NoLoaderAvailable::whilstRequiredFor($this->class);
        }
        if (null === $this->container) {
            throw NoContainerAvailable::whilstRequiredFor($this->class);
        }
        try {
            return HasOneProxy::inProperty($property,
                ProxyFactory::fromThis(
                    SimpleHydrator::forThe($this->container),
                    $this->loader,
                    new PropertyUpdaterFactory
                )
            );
        } catch (CannotInstantiateThis $problem) {
            throw NoSuchClass::couldNotLoadCollection($this->container);
        }
    }
private function oneProxyInThe ( string $ property ) : MapsProperty { if ( null === $ this -> loader ) { throw NoLoaderAvailable :: whilstRequiredFor ( $ this -> class ) ; } if ( null === $ this -> container ) { throw NoContainerAvailable :: whilstRequiredFor ( $ this -> class ) ; } try { return HasOneProxy :: inProperty ( $ property , ProxyFactory :: fromThis ( SimpleHydrator :: forThe ( $ this -> container ) , $ this -> loader , new PropertyUpdaterFactory ) ) ; } catch ( CannotInstantiateThis $ problem ) { throw NoSuchClass :: couldNotLoadCollection ( $ this -> container ) ; } }
Maps a lazily loaded collection as a single proxy.

@param string $property The property that gets a lazy relationship.
@return MapsProperty    The resulting property mapping.
@throws InvalidMapperConfiguration
Maps a lazily loaded collection as a single proxy .