diff --git a/lib/Doctrine/Relation/Parser.php b/lib/Doctrine/Relation/Parser.php index 457388d6e..e99b3add5 100644 --- a/lib/Doctrine/Relation/Parser.php +++ b/lib/Doctrine/Relation/Parser.php @@ -145,7 +145,9 @@ class Doctrine_Relation_Parser } } else { $def = $this->completeDefinition($def); - + if ( ! isset($def['foreign'])) { + Doctrine::dump($def); + } return new Doctrine_Relation_ForeignKey($def); } } @@ -301,6 +303,8 @@ class Doctrine_Relation_Parser } } } + + throw new Relation_Parser_Exception("Couldn't complete relation definition."); } } return $def; diff --git a/lib/Doctrine/Relation/Parser/Exception.php b/lib/Doctrine/Relation/Parser/Exception.php new file mode 100644 index 000000000..c9c10cf9a --- /dev/null +++ b/lib/Doctrine/Relation/Parser/Exception.php @@ -0,0 +1,34 @@ +. + */ +Doctrine::autoload('Doctrine_Relation_Exception'); +/** + * Doctrine_Relation_Parser_Exception + * + * @package Doctrine + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @category Object Relational Mapping + * @link www.phpdoctrine.com + * @since 1.0 + * @version $Revision$ + * @author Konsta Vesterinen + */ +class Doctrine_Relation_Parser_Exception extends Doctrine_Relation_Exception +{ }