/** * Filter the query by a related \DealerTeam\Model\DealerTeamVersion object * * @param \DealerTeam\Model\DealerTeamVersion|ObjectCollection $dealerTeamVersion the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildDealerTeamQuery The current query, for fluid interface */ public function filterByDealerTeamVersion($dealerTeamVersion, $comparison = null) { if ($dealerTeamVersion instanceof \DealerTeam\Model\DealerTeamVersion) { return $this->addUsingAlias(DealerTeamTableMap::ID, $dealerTeamVersion->getId(), $comparison); } elseif ($dealerTeamVersion instanceof ObjectCollection) { return $this->useDealerTeamVersionQuery()->filterByPrimaryKeys($dealerTeamVersion->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByDealerTeamVersion() only accepts arguments of type \\DealerTeam\\Model\\DealerTeamVersion or Collection'); } }
/** * Exclude object from result * * @param ChildDealerTeamVersion $dealerTeamVersion Object to remove from the list of results * * @return ChildDealerTeamVersionQuery The current query, for fluid interface */ public function prune($dealerTeamVersion = null) { if ($dealerTeamVersion) { $this->addCond('pruneCond0', $this->getAliasedColName(DealerTeamVersionTableMap::ID), $dealerTeamVersion->getId(), Criteria::NOT_EQUAL); $this->addCond('pruneCond1', $this->getAliasedColName(DealerTeamVersionTableMap::VERSION), $dealerTeamVersion->getVersion(), Criteria::NOT_EQUAL); $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR); } return $this; }
/** * Sets the properties of the current object to the value they had at a specific version * * @param ChildDealerTeamVersion $version The version object to use * @param ConnectionInterface $con the connection to use * @param array $loadedObjects objects that been loaded in a chain of populateFromVersion calls on referrer or fk objects. * * @return ChildDealerTeam The current object (for fluent API support) */ public function populateFromVersion($version, $con = null, &$loadedObjects = array()) { $loadedObjects['ChildDealerTeam'][$version->getId()][$version->getVersion()] = $this; $this->setId($version->getId()); $this->setDealerId($version->getDealerId()); $this->setTeamId($version->getTeamId()); $this->setCreatedAt($version->getCreatedAt()); $this->setUpdatedAt($version->getUpdatedAt()); $this->setVersion($version->getVersion()); $this->setVersionCreatedAt($version->getVersionCreatedAt()); $this->setVersionCreatedBy($version->getVersionCreatedBy()); if ($fkValue = $version->getDealerId()) { if (isset($loadedObjects['ChildDealer']) && isset($loadedObjects['ChildDealer'][$fkValue]) && isset($loadedObjects['ChildDealer'][$fkValue][$version->getDealerIdVersion()])) { $related = $loadedObjects['ChildDealer'][$fkValue][$version->getDealerIdVersion()]; } else { $related = new ChildDealer(); $relatedVersion = DealerVersionQuery::create()->filterById($fkValue)->filterByVersion($version->getDealerIdVersion())->findOne($con); $related->populateFromVersion($relatedVersion, $con, $loadedObjects); $related->setNew(false); } $this->setDealer($related); } return $this; }
/** * Adds an object to the instance pool. * * Propel keeps cached copies of objects in an instance pool when they are retrieved * from the database. In some cases you may need to explicitly add objects * to the cache in order to ensure that the same objects are always returned by find*() * and findPk*() calls. * * @param \DealerTeam\Model\DealerTeamVersion $obj A \DealerTeam\Model\DealerTeamVersion object. * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { if (Propel::isInstancePoolingEnabled()) { if (null === $key) { $key = serialize(array((string) $obj->getId(), (string) $obj->getVersion())); } // if key === null self::$instances[$key] = $obj; } }