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/Map/CategoryTableMap.php | 1 + Aufgabe06/generated-classes/Map/ProductCategoryTableMap.php | 1 + Aufgabe06/generated-classes/Map/ProductTableMap.php | 1 + 3 files changed, 3 insertions(+) (limited to 'Aufgabe06/generated-classes/Map') diff --git a/Aufgabe06/generated-classes/Map/CategoryTableMap.php b/Aufgabe06/generated-classes/Map/CategoryTableMap.php index bc2fd2c..b9aef89 100644 --- a/Aufgabe06/generated-classes/Map/CategoryTableMap.php +++ b/Aufgabe06/generated-classes/Map/CategoryTableMap.php @@ -153,6 +153,7 @@ class CategoryTableMap extends TableMap 1 => ':id', ), ), null, null, 'ProductCategories', false); + $this->addRelation('Product', '\\Product', RelationMap::MANY_TO_MANY, array(), null, null, 'Products'); } // buildRelations() /** diff --git a/Aufgabe06/generated-classes/Map/ProductCategoryTableMap.php b/Aufgabe06/generated-classes/Map/ProductCategoryTableMap.php index 44d7849..262f098 100644 --- a/Aufgabe06/generated-classes/Map/ProductCategoryTableMap.php +++ b/Aufgabe06/generated-classes/Map/ProductCategoryTableMap.php @@ -130,6 +130,7 @@ class ProductCategoryTableMap extends TableMap $this->setClassName('\\ProductCategory'); $this->setPackage(''); $this->setUseIdGenerator(false); + $this->setIsCrossRef(true); // columns $this->addForeignPrimaryKey('product_id', 'ProductId', 'INTEGER' , 'product', 'id', true, null, null); $this->addForeignPrimaryKey('category_id', 'CategoryId', 'INTEGER' , 'category', 'id', true, null, null); diff --git a/Aufgabe06/generated-classes/Map/ProductTableMap.php b/Aufgabe06/generated-classes/Map/ProductTableMap.php index c260802..820ebc3 100644 --- a/Aufgabe06/generated-classes/Map/ProductTableMap.php +++ b/Aufgabe06/generated-classes/Map/ProductTableMap.php @@ -171,6 +171,7 @@ class ProductTableMap extends TableMap 1 => ':id', ), ), null, null, 'ProductCategories', false); + $this->addRelation('Category', '\\Category', RelationMap::MANY_TO_MANY, array(), null, null, 'Categories'); } // buildRelations() /** -- cgit v1.2.3-70-g09d2