Declares an association between this object and a ChildMedia object.

@param  ChildMedia $v
@return $this|\Attogram\SharedMedia\Orm\M2P The current object (for fluent API support)
@throws PropelException
340322
public function setMedia(ChildMedia $v = null)
    {
        if ($v === null) {
            $this->setMediaId(NULL);
        } else {
            $this->setMediaId($v->getId());
        }

        $this->aMedia = $v;

        // Add binding for other direction of this n:n relationship.
        // If this object has already been added to the ChildMedia object, it will not be re-added.
        if ($v !== null) {
            $v->addM2P($this);
        }


        return $this;
    }
312698
public function setImagerepository($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->imagerepository !== $v) {
            $this->imagerepository = $v;
            $this->modifiedColumns[MediaTableMap::COL_IMAGEREPOSITORY] = true;
        }

        return $this;
    }
325717
public function setCustomer(ChildCustomer $v = null)
    {
        if ($v === null) {
            $this->setCustomerId(NULL);
        } else {
            $this->setCustomerId($v->getId());
        }

        $this->aCustomer = $v;

        // Add binding for other direction of this n:n relationship.
        // If this object has already been added to the ChildCustomer object, it will not be re-added.
        if ($v !== null) {
            $v->addCustomerCustomerGroup($this);
        }


        return $this;
    }
1195619
public function setDealerAdmin(ChildDealerAdmin $v = null)
    {
        if ($v === null) {
            $this->setId(NULL);
        } else {
            $this->setId($v->getId());
        }

        $this->aDealerAdmin = $v;

        // Add binding for other direction of this n:n relationship.
        // If this object has already been added to the ChildDealerAdmin object, it will not be re-added.
        if ($v !== null) {
            $v->addDealerAdminVersion($this);
        }


        return $this;
    }
556625
public function setDealerShedules(ChildDealerShedules $v = null)
    {
        if ($v === null) {
            $this->setId(NULL);
        } else {
            $this->setId($v->getId());
        }

        $this->aDealerShedules = $v;

        // Add binding for other direction of this n:n relationship.
        // If this object has already been added to the ChildDealerShedules object, it will not be re-added.
        if ($v !== null) {
            $v->addDealerShedulesVersion($this);
        }


        return $this;
    }
1153837
public function setPlayer(Player $v = null)
    {
        if ($v === null) {
            $this->setPlayerId(NULL);
        } else {
            $this->setPlayerId($v->getId());
        }

        $this->aPlayer = $v;

        // Add binding for other direction of this n:n relationship.
        // If this object has already been added to the Player object, it will not be re-added.
        if ($v !== null) {
            $v->addRecord($this);
        }


        return $this;
    }
735735
public function setIndexEngineDriverConfiguration(ChildIndexEngineDriverConfiguration $v = null)
    {
        if ($v === null) {
            $this->setIndexEngineDriverConfigurationId(null);
        } else {
            $this->setIndexEngineDriverConfigurationId($v->getId());
        }

        $this->aIndexEngineDriverConfiguration = $v;

        // Add binding for other direction of this n:n relationship.
        // If this object has already been added to the ChildIndexEngineDriverConfiguration object, it will not be re-added.
        if ($v !== null) {
            $v->addIndexEngineIndex($this);
        }

        return $this;
    }
74066
public function setAttributeType(ChildAttributeType $v = null)
    {
        if ($v === null) {
            $this->setId(NULL);
        } else {
            $this->setId($v->getId());
        }

        $this->aAttributeType = $v;

        // Add binding for other direction of this n:n relationship.
        // If this object has already been added to the ChildAttributeType object, it will not be re-added.
        if ($v !== null) {
            $v->addAttributeTypeI18n($this);
        }


        return $this;
    }
991739
public function getMedia(ConnectionInterface $con = null)
    {
        if ($this->aMedia === null && ($this->media_id != 0)) {
            $this->aMedia = ChildMediaQuery::create()->findPk($this->media_id, $con);
            /* The following can be used additionally to
                guarantee the related object contains a reference
                to this object.  This level of coupling may, however, be
                undesirable since it could result in an only partially populated collection
                in the referenced object.
                $this->aMedia->addM2Ps($this);
             */
        }

        return $this->aMedia;
    }
184619
public function setUser($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->user !== $v) {
            $this->user = $v;
            $this->modifiedColumns[MediaTableMap::COL_USER] = true;
        }

        return $this;
    }
525995
public function setKstrukturRoot(ChildKstruktur $v = null)
    {
        if ($v === null) {
            $this->setKstrukturId(NULL);
        } else {
            $this->setKstrukturId($v->getId());
        }

        $this->aKstrukturRoot = $v;

        // Add binding for other direction of this n:n relationship.
        // If this object has already been added to the ChildKstruktur object, it will not be re-added.
        if ($v !== null) {
            $v->addRootSkill($this);
        }


        return $this;
    }
345279
public function setRadioAttribute($a, $v)
    {
        foreach ($this->radios as $radio) {
            $radio->setAttribute($a, $v);
            if ($a == 'tabindex') {
                $v++;
            }
        }
        return $this;
    }
868120
public function setRemoteApp(RemoteApp $v = null)
    {
        if ($v === null) {
            $this->setRemoteAppId(NULL);
        } else {
            $this->setRemoteAppId($v->getId());
        }

        $this->aRemoteApp = $v;

        // Add binding for other direction of this n:n relationship.
        // If this object has already been added to the RemoteApp object, it will not be re-added.
        if ($v !== null) {
            $v->addApiLog($this);
        }


        return $this;
    }
1289417
public function setSkill(ChildSkill $v = null)
    {
        if ($v === null) {
            $this->setSkillId(NULL);
        } else {
            $this->setSkillId($v->getId());
        }

        $this->aSkill = $v;

        // Add binding for other direction of this n:n relationship.
        // If this object has already been added to the ChildSkill object, it will not be re-added.
        if ($v !== null) {
            $v->addSkillReference($this);
        }


        return $this;
    }
1206679
public function setUserid($v)
    {
        if ($v !== null) {
            $v = (int) $v;
        }

        if ($this->userid !== $v) {
            $this->userid = $v;
            $this->modifiedColumns[MediaTableMap::COL_USERID] = true;
        }

        return $this;
    }
1245659
public function setTeam(ChildTeam $v = null)
    {
        if ($v === null) {
            $this->setTeamId(NULL);
        } else {
            $this->setTeamId($v->getId());
        }

        $this->aTeam = $v;

        // Add binding for other direction of this n:n relationship.
        // If this object has already been added to the ChildTeam object, it will not be re-added.
        if ($v !== null) {
            $v->addPersonTeamLink($this);
        }


        return $this;
    }
753367
public function setFeatureAv(ChildFeatureAv $v = null)
    {
        if ($v === null) {
            $this->setFeatureAvId(NULL);
        } else {
            $this->setFeatureAvId($v->getId());
        }

        $this->aFeatureAv = $v;

        // Add binding for other direction of this n:n relationship.
        // If this object has already been added to the ChildFeatureAv object, it will not be re-added.
        if ($v !== null) {
            $v->addFeatureTypeAvMeta($this);
        }


        return $this;
    }