/** * Exclude object from result * * @param ChildResource $resource Object to remove from the list of results * * @return $this|ChildResourceQuery The current query, for fluid interface */ public function prune($resource = null) { if ($resource) { $this->addUsingAlias(ResourceTableMap::COL_RESOURCE_ID, $resource->getResourceId(), Criteria::NOT_EQUAL); } return $this; }
/** * Filter the query by a related \App\Propel\Resource object * * @param \App\Propel\Resource|ObjectCollection $resource 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 ChildSocialRecommendationQuery The current query, for fluid interface */ public function filterByResource($resource, $comparison = null) { if ($resource instanceof \App\Propel\Resource) { return $this->addUsingAlias(SocialRecommendationTableMap::COL_SOCIAL_RECOMMENDATION_FOR, $resource->getResourceId(), $comparison); } elseif ($resource instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(SocialRecommendationTableMap::COL_SOCIAL_RECOMMENDATION_FOR, $resource->toKeyValue('PrimaryKey', 'ResourceId'), $comparison); } else { throw new PropelException('filterByResource() only accepts arguments of type \\App\\Propel\\Resource or Collection'); } }
/** * Filter the query by a related \App\Propel\Resource object * * @param \App\Propel\Resource|ObjectCollection $resource 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 ChildProductHighlightedQuery The current query, for fluid interface */ public function filterByResource($resource, $comparison = null) { if ($resource instanceof \App\Propel\Resource) { return $this->addUsingAlias(ProductHighlightedTableMap::COL_PRODUCT_HIGHLIGHTED_FOR, $resource->getResourceId(), $comparison); } elseif ($resource instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(ProductHighlightedTableMap::COL_PRODUCT_HIGHLIGHTED_FOR, $resource->toKeyValue('PrimaryKey', 'ResourceId'), $comparison); } else { throw new PropelException('filterByResource() only accepts arguments of type \\App\\Propel\\Resource or Collection'); } }
/** * Declares an association between this object and a ChildResource object. * * @param ChildResource $v * @return $this|\App\Propel\ResourceFile The current object (for fluent API support) * @throws PropelException */ public function setResource(ChildResource $v = null) { if ($v === null) { $this->setResourceId(NULL); } else { $this->setResourceId($v->getResourceId()); } $this->aResource = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildResource object, it will not be re-added. if ($v !== null) { $v->addResourceFile($this); } return $this; }