Example #1
0
 /**
  * Clears the current object, sets all attributes to their default values and removes
  * outgoing references as well as back-references (from other objects to this one. Results probably in a database
  * change of those foreign objects when you call `save` there).
  */
 public function clear()
 {
     if (null !== $this->aMlbTeamRef) {
         $this->aMlbTeamRef->removePlayers($this);
     }
     if (null !== $this->aCardRef) {
         $this->aCardRef->removePlayers($this);
     }
     if (null !== $this->aDivisionRef) {
         $this->aDivisionRef->removePlayers($this);
     }
     if (null !== $this->aPositionRef) {
         $this->aPositionRef->removePlayers($this);
     }
     if (null !== $this->aTeams) {
         $this->aTeams->removePlayers($this);
     }
     $this->id = null;
     $this->lastn = null;
     $this->bats = null;
     $this->bday = null;
     $this->age = null;
     $this->mlb = null;
     $this->draft_year = null;
     $this->position = null;
     $this->card = null;
     $this->d_e = null;
     $this->lg = null;
     $this->mwbl = null;
     $this->category = null;
     $this->comment = null;
     $this->mwbl_link = null;
     $this->mlb_link = null;
     $this->mwbl_link_enabled = null;
     $this->mlb_link_enabled = null;
     $this->create_ts = null;
     $this->maint_ts = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->applyDefaultValues();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }
 /**
  * Exclude object from result
  *
  * @param   ChildMlbTeamRef $mlbTeamRef Object to remove from the list of results
  *
  * @return $this|ChildMlbTeamRefQuery The current query, for fluid interface
  */
 public function prune($mlbTeamRef = null)
 {
     if ($mlbTeamRef) {
         $this->addUsingAlias(MlbTeamRefTableMap::COL_MLB, $mlbTeamRef->getMlb(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
Example #3
0
 /**
  * Filter the query by a related \MlbTeamRef object
  *
  * @param \MlbTeamRef|ObjectCollection $mlbTeamRef The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return ChildPlayersQuery The current query, for fluid interface
  */
 public function filterByMlbTeamRef($mlbTeamRef, $comparison = null)
 {
     if ($mlbTeamRef instanceof \MlbTeamRef) {
         return $this->addUsingAlias(PlayersTableMap::COL_MLB, $mlbTeamRef->getMlb(), $comparison);
     } elseif ($mlbTeamRef instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(PlayersTableMap::COL_MLB, $mlbTeamRef->toKeyValue('PrimaryKey', 'Mlb'), $comparison);
     } else {
         throw new PropelException('filterByMlbTeamRef() only accepts arguments of type \\MlbTeamRef or Collection');
     }
 }