/** * Exclude object from result * * @param ChildResourceTypeI18n $resourceTypeI18n Object to remove from the list of results * * @return $this|ChildResourceTypeI18nQuery The current query, for fluid interface */ public function prune($resourceTypeI18n = null) { if ($resourceTypeI18n) { $this->addCond('pruneCond0', $this->getAliasedColName(ResourceTypeI18nTableMap::COL_RESOURCE_TYPE_ID), $resourceTypeI18n->getResourceTypeId(), Criteria::NOT_EQUAL); $this->addCond('pruneCond1', $this->getAliasedColName(ResourceTypeI18nTableMap::COL_LOCALE), $resourceTypeI18n->getLocale(), Criteria::NOT_EQUAL); $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR); } 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 \App\Propel\ResourceTypeI18n $obj A \App\Propel\ResourceTypeI18n 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->getResourceTypeId() || is_scalar($obj->getResourceTypeId()) || is_callable([$obj->getResourceTypeId(), '__toString']) ? (string) $obj->getResourceTypeId() : $obj->getResourceTypeId(), null === $obj->getLocale() || is_scalar($obj->getLocale()) || is_callable([$obj->getLocale(), '__toString']) ? (string) $obj->getLocale() : $obj->getLocale()]); } // if key === null self::$instances[$key] = $obj; } }