Exclude object from result

@param   ChildDealerI18n $dealerI18n Object to remove from the list of results

@return ChildDealerI18nQuery The current query, for fluid interface
329860
public function prune($dealerI18n = null)
    {
        if ($dealerI18n) {
            $this->addCond('pruneCond0', $this->getAliasedColName(DealerI18nTableMap::ID), $dealerI18n->getId(), Criteria::NOT_EQUAL);
            $this->addCond('pruneCond1', $this->getAliasedColName(DealerI18nTableMap::LOCALE), $dealerI18n->getLocale(), Criteria::NOT_EQUAL);
            $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);
        }

        return $this;
    }
712708
protected function foreignKeyCondition(string $parentAlias, string $classTableAlias)
    {
        return Expr::equal(
                Expr::column($parentAlias, $this->parentTable->getPrimaryKeyColumn()),
                Expr::column($classTableAlias, $this->classTable->getPrimaryKeyColumn())
        );
    }
1371141
public function addDealerI18n(ChildDealerI18n $l)
    {
        if ($l && $locale = $l->getLocale()) {
            $this->setLocale($locale);
            $this->currentTranslations[$locale] = $l;
        }
        if ($this->collDealerI18ns === null) {
            $this->initDealerI18ns();
            $this->collDealerI18nsPartial = true;
        }

        if (!in_array($l, $this->collDealerI18ns->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
            $this->doAddDealerI18n($l);
        }

        return $this;
    }
1301234
public function assignChildren ($relationIdentifier, $id, $childIds, $subtractive = true)
		{
			$relation = $this->getRelation($relationIdentifier);
			$childIds = (array)$childIds;

			if (! $relation) {
				throw new RelationException('Invalid relation `' . $relationIdentifier);
			}

			if ($relation instanceof OneToMany) {
				$this->database->createQuery()
					->update()
					->table($relation->getRelatedTable())
					->set(
						array(
							$relation->getRelatedKey() => $id,
						)
					)
					->whereIn($this->database->primaryKey($relation->getRelatedTable()), $childIds)
					->execute();

				if ($subtractive) {
					$this->database->createQuery()
						->update()
						->table($relation->getRelatedTable())
						->set(
							array(
								$relation->getRelatedKey() => null,
							)
						)
						->whereEqual($relation->getRelatedKey(), $id)
						->whereNotIn($this->database->primaryKey($relation->getRelatedTable()), $childIds)
						->execute();
				}
			} else if ($relation instanceof ManyToMany) {
				if ($subtractive) {
					$this->database->createQuery()
						->delete()
						->from($relation->getRelationalTable())
						->whereEqual($relation->getKey(), $id)
						->whereNotIn($relation->getRelatedKey(), $childIds)
						->execute();
				}

				$query = $this->database->createQuery();

				$assignedIds =
					$query->select($relation->getRelatedKey())
						->from($relation->getRelationalTable())
						->whereEqual($relation->getKey(), $id)
						->execute()
						->fetchColumn();

				$newIds = array_diff($childIds, $assignedIds);

				foreach ($newIds as $newId) {
					$this->database->createQuery()
						->insert()
						->into($relation->getRelationalTable())
						->set(
							array(
								$relation->getKey()        => $id,
								$relation->getRelatedKey() => $newId,
							)
						)
						->execute();
				}
			} else {
				throw new RelationException('Invalid relation type `' . gettype($relation) . '`');
			}
		}
548724
public function deleteTranslation($locale, $id)
    {
        if ('en' === $locale) {
            $content = $this->content->findOneBy(['id' => $id]);
        } else {
            $content = $this->translations->findOneBy(['foreignKey' => $id, 'locale' => $locale]);
        }

        if ($content instanceof ContentTranslation || $content instanceof Content) {
            $this->manager->remove($content);
            $this->manager->flush();
        }
    }
365584
public function getPackageSelectQuery(PackageVersionEntity $packageVersion, LocaleEntity $locale, $excludeUntranslatedStrings = false)
    {
        $cn = $this->app->make(EntityManager::class)->getConnection();
        $queryPackageVersionID = (int) $packageVersion->getID();

        return $cn->executeQuery(
            $this->getBaseSelectString($locale, true, $excludeUntranslatedStrings) .
            "
                where
                    CommunityTranslationTranslatablePlaces.packageVersion = $queryPackageVersionID
                order by
                    CommunityTranslationTranslatablePlaces.sort
            "
        );
    }
108943
private function removeOldChildRoutes(SessionInterface $session, array $oldRoutes, $locale)
    {
        foreach ($oldRoutes as $oldRoute) {
            $oldRouteEntity = $this->routeRepository->findByPath($oldRoute, $locale);
            if ($oldRouteEntity && !$this->nodeExists($session, $oldRouteEntity->getEntityId())) {
                $this->entityManager->remove($oldRouteEntity);
            }
        }

        $this->entityManager->flush();
    }
809648
public function prune($dealerContent = null)
    {
        if ($dealerContent) {
            $this->addUsingAlias(DealerContentTableMap::ID, $dealerContent->getId(), Criteria::NOT_EQUAL);
        }

        return $this;
    }
1004156
protected function excludeOne(DataQuery $query)
    {
        $this->model = $query->applyRelation($this->relation);

        $predicate = sprintf("%s %s ?", $this->getDbName(), $this->getInverseOperator());
        $clause = [$predicate => $this->getDbFormattedValue()];

        return $this->aggregate ?
            $this->applyAggregate($query, $clause) :
            $query->where($clause);
    }
372444
public function getTranslation($locale = 'en_US', ConnectionInterface $con = null)
    {
        if (!isset($this->currentTranslations[$locale])) {
            if (null !== $this->collDealerContactI18ns) {
                foreach ($this->collDealerContactI18ns as $translation) {
                    if ($translation->getLocale() == $locale) {
                        $this->currentTranslations[$locale] = $translation;

                        return $translation;
                    }
                }
            }
            if ($this->isNew()) {
                $translation = new ChildDealerContactI18n();
                $translation->setLocale($locale);
            } else {
                $translation = ChildDealerContactI18nQuery::create()
                    ->filterByPrimaryKey(array($this->getPrimaryKey(), $locale))
                    ->findOneOrCreate($con);
                $this->currentTranslations[$locale] = $translation;
            }
            $this->addDealerContactI18n($translation);
        }

        return $this->currentTranslations[$locale];
    }
931129
public function removeItem($itemId, $user = null, $locale = null)
    {
        $cart = $this->getUserCart($user, $locale);

        $item = $this->orderManager->getOrderItemById($itemId, $cart->getEntity(), $hasMultiple);

        $this->orderManager->removeItem($item, $cart->getEntity(), !$hasMultiple);

        $this->orderManager->updateApiEntity($cart, $locale);

        return $cart;
    }
365020
public function getByLocale(
        \Sonata\DoctrineORMAdminBundle\Datagrid\ProxyQuery $queryBuilder,
        $alias,
        $field,
        $value
    ) {
        if (!$locale = $value['value']) {
            $locale = $this->getDefaultLocale();
        }
        $queryBuilder->where(sprintf('%s.locale = :locale', $alias));
        $queryBuilder->andWhere($queryBuilder->expr()->isNotNull(sprintf('%s.parent', $alias)));
        $queryBuilder->setParameter(':locale', $locale);

        return true;
    }
1152575
public function prune($dealerVersion = null)
    {
        if ($dealerVersion) {
            $this->addCond('pruneCond0', $this->getAliasedColName(DealerVersionTableMap::ID), $dealerVersion->getId(), Criteria::NOT_EQUAL);
            $this->addCond('pruneCond1', $this->getAliasedColName(DealerVersionTableMap::VERSION), $dealerVersion->getVersion(), Criteria::NOT_EQUAL);
            $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);
        }

        return $this;
    }
1088129
public function prune($attributeTypeI18n = null)
    {
        if ($attributeTypeI18n) {
            $this->addCond('pruneCond0', $this->getAliasedColName(AttributeTypeI18nTableMap::ID), $attributeTypeI18n->getId(), Criteria::NOT_EQUAL);
            $this->addCond('pruneCond1', $this->getAliasedColName(AttributeTypeI18nTableMap::LOCALE), $attributeTypeI18n->getLocale(), Criteria::NOT_EQUAL);
            $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);
        }

        return $this;
    }
32440
public function getDealerAdmin(ConnectionInterface $con = null)
    {
        if ($this->aDealerAdmin === null && ($this->id !== null)) {
            $this->aDealerAdmin = ChildDealerAdminQuery::create()->findPk($this->id, $con);
            /* The following can be used additionally to
                guarantee the related object contains a reference
                to this object.  This level of coupling may, however, be
                undesirable since it could result in an only partially populated collection
                in the referenced object.
                $this->aDealerAdmin->addDealerAdminVersions($this);
             */
        }

        return $this->aDealerAdmin;
    }
634171
public function countDealerI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collDealerI18nsPartial && !$this->isNew();
        if (null === $this->collDealerI18ns || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collDealerI18ns) {
                return 0;
            }

            if ($partial && !$criteria) {
                return count($this->getDealerI18ns());
            }

            $query = ChildDealerI18nQuery::create(null, $criteria);
            if ($distinct) {
                $query->distinct();
            }

            return $query
                ->filterByDealer($this)
                ->count($con);
        }

        return count($this->collDealerI18ns);
    }
31204
public function scopeWithTranslation(Builder $query)
    {
        $query->with([
            'translations' => function (Relation $query) {
                if ($this->useFallback()) {
                    $locale = $this->locale();
                    $countryFallbackLocale = $this->getFallbackLocale($locale); // e.g. de-DE => de
                    $locales = array_unique([$locale, $countryFallbackLocale, $this->getFallbackLocale()]);

                    return $query->whereIn($this->getTranslationsTable().'.'.$this->getLocaleKey(), $locales);
                }

                return $query->where($this->getTranslationsTable().'.'.$this->getLocaleKey(), $this->locale());
            },
        ]);
    }