예제 #1
0
 /**
  * Exclude object from result
  *
  * @param   ChildConfigVersion $configVersion Object to remove from the list of results
  *
  * @return $this|ChildConfigVersionQuery The current query, for fluid interface
  */
 public function prune($configVersion = null)
 {
     if ($configVersion) {
         $this->addCond('pruneCond0', $this->getAliasedColName(ConfigVersionTableMap::COL_CONFIG_ID), $configVersion->getConfigId(), Criteria::NOT_EQUAL);
         $this->addCond('pruneCond1', $this->getAliasedColName(ConfigVersionTableMap::COL_VERSION), $configVersion->getVersion(), Criteria::NOT_EQUAL);
         $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);
     }
     return $this;
 }
예제 #2
0
 /**
  * Sets the properties of the current object to the value they had at a specific version
  *
  * @param ChildConfigVersion $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 $this|ChildConfig The current object (for fluent API support)
  */
 public function populateFromVersion($version, $con = null, &$loadedObjects = array())
 {
     $loadedObjects['ChildConfig'][$version->getConfigId()][$version->getVersion()] = $this;
     $this->setConfigId($version->getConfigId());
     $this->setConfigCategoryId($version->getConfigCategoryId());
     $this->setConfigKey($version->getConfigKey());
     $this->setConfigValue($version->getConfigValue());
     $this->setConfigFormat($version->getConfigFormat());
     $this->setVersion($version->getVersion());
     return $this;
 }
예제 #3
0
 /**
  * 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 \App\Propel\ConfigVersion $obj A \App\Propel\ConfigVersion 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([null === $obj->getConfigId() || is_scalar($obj->getConfigId()) || is_callable([$obj->getConfigId(), '__toString']) ? (string) $obj->getConfigId() : $obj->getConfigId(), null === $obj->getVersion() || is_scalar($obj->getVersion()) || is_callable([$obj->getVersion(), '__toString']) ? (string) $obj->getVersion() : $obj->getVersion()]);
         }
         // if key === null
         self::$instances[$key] = $obj;
     }
 }
예제 #4
0
 /**
  * Filter the query by a related \App\Propel\ConfigVersion object
  *
  * @param \App\Propel\ConfigVersion|ObjectCollection $configVersion the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildConfigQuery The current query, for fluid interface
  */
 public function filterByConfigVersion($configVersion, $comparison = null)
 {
     if ($configVersion instanceof \App\Propel\ConfigVersion) {
         return $this->addUsingAlias(ConfigTableMap::COL_CONFIG_ID, $configVersion->getConfigId(), $comparison);
     } elseif ($configVersion instanceof ObjectCollection) {
         return $this->useConfigVersionQuery()->filterByPrimaryKeys($configVersion->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByConfigVersion() only accepts arguments of type \\App\\Propel\\ConfigVersion or Collection');
     }
 }