From 2bde9f66925c9f04f24b6e5dbdd86d6d090f96a6 Mon Sep 17 00:00:00 2001 From: jackbravo Date: Wed, 12 Sep 2007 23:29:02 +0000 Subject: [PATCH] Small note on unlink all --- manual/new/docs/en/working-with-objects.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/manual/new/docs/en/working-with-objects.txt b/manual/new/docs/en/working-with-objects.txt index 418f9a560..05255191c 100644 --- a/manual/new/docs/en/working-with-objects.txt +++ b/manual/new/docs/en/working-with-objects.txt @@ -39,6 +39,9 @@ Another way to {{unlink}} the relationships between related objects is through t $user = $conn->getTable('User')->find(5); $user->unlink('Group', array(0, 1)); $user->save(); + +// you can also unlink ALL relationships to Group +$user->unlink('Group'); While the obvious and convinient way of deleting a link between User and Group would be the following, you still should *NOT* do this: