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->aCompanyRelatedByPublisherId) {
         $this->aCompanyRelatedByPublisherId->removeGameRelatedByPublisherId($this);
     }
     if (null !== $this->aCompanyRelatedByDeveloperId) {
         $this->aCompanyRelatedByDeveloperId->removeGameRelatedByDeveloperId($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->admin_lock = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->applyDefaultValues();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }
Example #2
0
 /**
  * Filter the query by a related \Company object
  *
  * @param \Company|ObjectCollection $company 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 ChildGameQuery The current query, for fluid interface
  */
 public function filterByCompanyRelatedByDeveloperId($company, $comparison = null)
 {
     if ($company instanceof \Company) {
         return $this->addUsingAlias(GameTableMap::COL_DEVELOPER_ID, $company->getId(), $comparison);
     } elseif ($company instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(GameTableMap::COL_DEVELOPER_ID, $company->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByCompanyRelatedByDeveloperId() only accepts arguments of type \\Company or Collection');
     }
 }
Example #3
0
 /**
  * Exclude object from result
  *
  * @param   ChildCompany $company Object to remove from the list of results
  *
  * @return $this|ChildCompanyQuery The current query, for fluid interface
  */
 public function prune($company = null)
 {
     if ($company) {
         $this->addUsingAlias(CompanyTableMap::COL_ID, $company->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }