From c5e60f3e5cfb51df8be46c640e8dc051a4e76e51 Mon Sep 17 00:00:00 2001 From: guilhermeblanco Date: Wed, 23 Jan 2008 15:21:28 +0000 Subject: [PATCH] Adjusted ownsOne and ownsMany methods errors to be better descriptives --- lib/Doctrine/Record/Abstract.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/Record/Abstract.php b/lib/Doctrine/Record/Abstract.php index 6eeb838ea..f70715300 100644 --- a/lib/Doctrine/Record/Abstract.php +++ b/lib/Doctrine/Record/Abstract.php @@ -211,7 +211,10 @@ abstract class Doctrine_Record_Abstract extends Doctrine_Access */ public function ownsOne() { - throw new Doctrine_Exception('ownsMany() has been deprecated.'); + throw new Doctrine_Exception( + 'ownsMany() has been deprecated. ' . + 'To create a composite relationship, use hasMany() with onDelete CASCADE option.' + ); } /** @@ -227,7 +230,10 @@ abstract class Doctrine_Record_Abstract extends Doctrine_Access */ public function ownsMany() { - throw new Doctrine_Exception('ownsOne() has been deprecated.'); + throw new Doctrine_Exception( + 'ownsOne() has been deprecated. ' . + 'To create a composite relationship, use hasOne() with onDelete CASCADE option.' + ); } /**