From 66b34314d67c695b899b704feffbe723453f1dbf Mon Sep 17 00:00:00 2001 From: Stefan Suhren Date: Mon, 4 May 2015 12:32:33 +0200 Subject: Use isCrossRef for a many-to-many relation --- Aufgabe06/generated-classes/Base/ProductQuery.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'Aufgabe06/generated-classes/Base/ProductQuery.php') diff --git a/Aufgabe06/generated-classes/Base/ProductQuery.php b/Aufgabe06/generated-classes/Base/ProductQuery.php index 84c59aa..0665619 100644 --- a/Aufgabe06/generated-classes/Base/ProductQuery.php +++ b/Aufgabe06/generated-classes/Base/ProductQuery.php @@ -548,6 +548,23 @@ abstract class ProductQuery extends ModelCriteria ->useQuery($relationAlias ? $relationAlias : 'ProductCategory', '\ProductCategoryQuery'); } + /** + * Filter the query by a related Category object + * using the product_category table as cross reference + * + * @param Category $category the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildProductQuery The current query, for fluid interface + */ + public function filterByCategory($category, $comparison = Criteria::EQUAL) + { + return $this + ->useProductCategoryQuery() + ->filterByCategory($category, $comparison) + ->endUse(); + } + /** * Exclude object from result * -- cgit v1.2.3-70-g09d2