/** * 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->aMake) { $this->aMake->removeVehicle($this); } $this->id = null; $this->name = null; $this->color = null; $this->make_id = null; $this->alreadyInSave = false; $this->clearAllReferences(); $this->resetModified(); $this->setNew(true); $this->setDeleted(false); }
/** * Filter the query by a related \Anand\Make object * * @param \Anand\Make|ObjectCollection $make 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 ChildVehicleQuery The current query, for fluid interface */ public function filterByMake($make, $comparison = null) { if ($make instanceof \Anand\Make) { return $this->addUsingAlias(VehicleTableMap::COL_MAKE_ID, $make->getId(), $comparison); } elseif ($make instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(VehicleTableMap::COL_MAKE_ID, $make->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByMake() only accepts arguments of type \\Anand\\Make or Collection'); } }
/** * Exclude object from result * * @param ChildMake $make Object to remove from the list of results * * @return $this|ChildMakeQuery The current query, for fluid interface */ public function prune($make = null) { if ($make) { $this->addUsingAlias(MakeTableMap::COL_ID, $make->getId(), Criteria::NOT_EQUAL); } return $this; }