예제 #1
0
파일: Games.php 프로젝트: nirkbirk/site
 /**
  * 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->aCompaniesRelatedByPublisherId) {
         $this->aCompaniesRelatedByPublisherId->removeGamesRelatedByPublisherId($this);
     }
     if (null !== $this->aCompaniesRelatedByDeveloperId) {
         $this->aCompaniesRelatedByDeveloperId->removeGamesRelatedByDeveloperId($this);
     }
     $this->id = null;
     $this->name = null;
     $this->title = null;
     $this->description = null;
     $this->publisher_id = null;
     $this->developer_id = null;
     $this->gb_id = null;
     $this->gb_url = null;
     $this->gb_image = null;
     $this->gb_thumb = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }
예제 #2
0
 /**
  * Filter the query by a related \Companies object
  *
  * @param \Companies|ObjectCollection $companies 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 ChildGamesQuery The current query, for fluid interface
  */
 public function filterByCompaniesRelatedByDeveloperId($companies, $comparison = null)
 {
     if ($companies instanceof \Companies) {
         return $this->addUsingAlias(GamesTableMap::COL_DEVELOPER_ID, $companies->getId(), $comparison);
     } elseif ($companies instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(GamesTableMap::COL_DEVELOPER_ID, $companies->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByCompaniesRelatedByDeveloperId() only accepts arguments of type \\Companies or Collection');
     }
 }
예제 #3
0
 /**
  * Exclude object from result
  *
  * @param   ChildCompanies $companies Object to remove from the list of results
  *
  * @return $this|ChildCompaniesQuery The current query, for fluid interface
  */
 public function prune($companies = null)
 {
     if ($companies) {
         $this->addUsingAlias(CompaniesTableMap::COL_ID, $companies->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }