From 186b4465ad6f869a84a0d3b55d57422b4b5ef317 Mon Sep 17 00:00:00 2001 From: zYne Date: Wed, 30 Aug 2006 11:23:22 +0000 Subject: [PATCH] Docs updated --- ...Basic Components - Connection - Introduction.php | 0 ...object relations - Composites and aggregates.php | 13 +++++++------ .../Mapping object relations - Introduction.php | 3 ++- 3 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 manual/codes/Basic Components - Connection - Introduction.php diff --git a/manual/codes/Basic Components - Connection - Introduction.php b/manual/codes/Basic Components - Connection - Introduction.php new file mode 100644 index 000000000..e69de29bb diff --git a/manual/docs/Mapping object relations - Composites and aggregates.php b/manual/docs/Mapping object relations - Composites and aggregates.php index a512fb3e3..efbe9f42e 100644 --- a/manual/docs/Mapping object relations - Composites and aggregates.php +++ b/manual/docs/Mapping object relations - Composites and aggregates.php @@ -1,8 +1,9 @@ -Doctrine supports aggregates and composites. When binding composites you can use methods Doctrine_Table::ownsOne() and Doctrine_Table::ownsMany(). When binding -aggregates you can use methods Doctrine_Table::hasOne() and Doctrine_Table::hasMany(). +Doctrine supports aggregates and composites. When binding composites you can use methods Doctrine_Record::ownsOne() and Doctrine_Record::ownsMany(). When binding +aggregates you can use methods Doctrine_Record::hasOne() and Doctrine_Record::hasMany(). Basically using the owns* methods is like adding a database level ON CASCADE DELETE +constraint on related component with an exception that doctrine handles the deletion in application level.

-In Doctrine if you bind an Email to a User using ownsOne or ownsMany methods, everytime User record calls save or delete the associated -Email record is also saved/deleted. +In Doctrine if you bind an Email to a User using ownsOne or ownsMany methods, everytime User record calls delete the associated +Email record is also deleted.

-Then again if you bind an Email to a User using hasOne or hasMany methods, everytime User record calls save or delete the associated -Email record is NOT saved/deleted. +Then again if you bind an Email to a User using hasOne or hasMany methods, everytime User record calls delete the associated +Email record is NOT deleted. diff --git a/manual/docs/Mapping object relations - Introduction.php b/manual/docs/Mapping object relations - Introduction.php index 1f0c49eb0..8f3da94ca 100644 --- a/manual/docs/Mapping object relations - Introduction.php +++ b/manual/docs/Mapping object relations - Introduction.php @@ -1 +1,2 @@ -In Doctrine all record relations are being set with hasMany, hasOne, ownsMany and ownsOne methods. +In Doctrine all record relations are being set with hasMany, hasOne, ownsMany and ownsOne methods. Doctrine supports almost any kind of database relation +from simple one-to-one foreign key relations to join table self-referencing relations.