src/Rails/ActiveRecord/Base/Methods/AssociationsMethodsTrait.php
public function setAssociation($name, $value, $raw = false)
    {
        if ($raw) {
            $this->loadedAssociations[$name] = $value;
        } else {
            return (new Setter())->set($this, $name, $value);
        }
    }
public function setAssociation($name, $value, $raw = false)
    {
        if ($raw) {
            $this->loadedAssociations[$name] = $value;
        } else {
            return (new Setter())->set($this, $name, $value);
        }
    }
public function setAssociation ( $ name , $ value , $ raw = false ) { if ( $ raw ) { $ this -> loadedAssociations [ $ name ] = $ value ; } else { return ( new Setter ( ) ) -> set ( $ this , $ name , $ value ) ; } }
Associates an object to a one-to-one association.
Other associations are done in CollectionProxy.
Associates an object to a one - to - one association . Other associations are done in CollectionProxy .