diff options
Diffstat (limited to 'generated-classes/Map/CategoryTableMap.php')
| -rw-r--r-- | generated-classes/Map/CategoryTableMap.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/generated-classes/Map/CategoryTableMap.php b/generated-classes/Map/CategoryTableMap.php index b9aef89..39f598f 100644 --- a/generated-classes/Map/CategoryTableMap.php +++ b/generated-classes/Map/CategoryTableMap.php @@ -152,9 +152,18 @@ class CategoryTableMap extends TableMap 0 => ':category_id', 1 => ':id', ), -), null, null, 'ProductCategories', false); - $this->addRelation('Product', '\\Product', RelationMap::MANY_TO_MANY, array(), null, null, 'Products'); +), 'CASCADE', 'CASCADE', 'ProductCategories', false); + $this->addRelation('Product', '\\Product', RelationMap::MANY_TO_MANY, array(), 'CASCADE', 'CASCADE', 'Products'); } // buildRelations() + /** + * Method to invalidate the instance pool of all tables related to category * by a foreign key with ON DELETE CASCADE + */ + public static function clearRelatedInstancePool() + { + // Invalidate objects in related instance pools, + // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. + ProductCategoryTableMap::clearInstancePool(); + } /** * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. |
