From 8a1766e96471643c9162328e60621c241aebaeee Mon Sep 17 00:00:00 2001 From: zYne Date: Sun, 21 Jan 2007 22:26:38 +0000 Subject: [PATCH] fixed ATTR_COLL_KEY handling --- lib/Doctrine/Configurable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/Configurable.php b/lib/Doctrine/Configurable.php index 7e3f4ebc5..27e15f07b 100644 --- a/lib/Doctrine/Configurable.php +++ b/lib/Doctrine/Configurable.php @@ -113,7 +113,7 @@ abstract class Doctrine_Configurable if ( ! ($this instanceof Doctrine_Table)) { throw new Doctrine_Exception("This attribute can only be set at table level."); } - if ( ! $this->hasColumn($value)) { + if ($value !== null && ! $this->hasColumn($value)) { throw new Doctrine_Exception("Couldn't set collection key attribute. No such column '$value'"); } break;