diff --git a/Doctrine.php b/Doctrine.php index c161e4e3e..f3216197e 100644 --- a/Doctrine.php +++ b/Doctrine.php @@ -117,14 +117,6 @@ final class Doctrine { * batch size attribute */ const ATTR_BATCH_SIZE = 8; - /** - * primary key columns attribute - */ - const ATTR_PK_COLUMNS = 9; - /** - * primary key type attribute - */ - const ATTR_PK_TYPE = 10; /** * locking attribute */ @@ -283,20 +275,6 @@ final class Doctrine { * mode for pessimistic locking */ const LOCK_PESSIMISTIC = 1; - - /** - * PRIMARY KEY TYPE CONSTANTS - */ - - /** - * auto-incremented/(sequence updated) primary key - */ - const INCREMENT_KEY = 0; - /** - * unique key - */ - const UNIQUE_KEY = 1; - /** * constructor */ diff --git a/Doctrine/Configurable.php b/Doctrine/Configurable.php index 9d6f13996..07ea6dcb2 100644 --- a/Doctrine/Configurable.php +++ b/Doctrine/Configurable.php @@ -76,15 +76,6 @@ abstract class Doctrine_Configurable { case Doctrine::ATTR_LISTENER: $this->setEventListener($value); break; - case Doctrine::ATTR_PK_COLUMNS: - if( ! is_array($value)) - throw new Doctrine_Exception("The value of Doctrine::ATTR_PK_COLUMNS attribute must be an array"); - break; - case Doctrine::ATTR_PK_TYPE: - if($value != Doctrine::INCREMENT_KEY && $value != Doctrine::UNIQUE_KEY) - throw new Doctrine_Exception("The value of Doctrine::ATTR_PK_TYPE attribute must be either Doctrine::INCREMENT_KEY or Doctrine::UNIQUE_KEY"); - - break; case Doctrine::ATTR_LOCKMODE: if($this instanceof Doctrine_Connection) { if($this->getTransaction()->getState() != Doctrine_Connection_Transaction::STATE_OPEN) diff --git a/Doctrine/Manager.php b/Doctrine/Manager.php index 54e554946..9a1a32a26 100644 --- a/Doctrine/Manager.php +++ b/Doctrine/Manager.php @@ -82,8 +82,6 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera Doctrine::ATTR_BATCH_SIZE => 5, Doctrine::ATTR_COLL_LIMIT => 5, Doctrine::ATTR_LISTENER => new Doctrine_EventListener_Empty(), - Doctrine::ATTR_PK_COLUMNS => array("id"), - Doctrine::ATTR_PK_TYPE => Doctrine::INCREMENT_KEY, Doctrine::ATTR_LOCKMODE => 1, Doctrine::ATTR_VLD => false, Doctrine::ATTR_CREATE_TABLES => true, diff --git a/Doctrine/Repository.php b/Doctrine/Repository.php index 89d27b349..87c0a1d0f 100644 --- a/Doctrine/Repository.php +++ b/Doctrine/Repository.php @@ -1,4 +1,23 @@ . + */ /** * Doctrine_Repository * each record is added into Doctrine_Repository at the same time they are created, @@ -8,8 +27,6 @@ * @package Doctrine ORM * @url www.phpdoctrine.com * @license LGPL - * @version 1.0 alpha - * */ class Doctrine_Repository implements Countable, IteratorAggregate { /** diff --git a/tests/ConfigurableTestCase.php b/tests/ConfigurableTestCase.php index a88db2c04..f4f43f486 100644 --- a/tests/ConfigurableTestCase.php +++ b/tests/ConfigurableTestCase.php @@ -25,12 +25,6 @@ class Doctrine_ConfigurableTestCase extends Doctrine_UnitTestCase { $this->manager->setAttribute(Doctrine::ATTR_LISTENER, new Doctrine_EventListener_Debugger()); $this->assertTrue($this->manager->getAttribute(Doctrine::ATTR_LISTENER) instanceof Doctrine_EventListener_Debugger); - $this->manager->setAttribute(Doctrine::ATTR_PK_COLUMNS, array("id")); - $this->assertEqual($this->manager->getAttribute(Doctrine::ATTR_PK_COLUMNS), array("id")); - - $this->manager->setAttribute(Doctrine::ATTR_PK_TYPE, Doctrine::INCREMENT_KEY); - $this->assertEqual($this->manager->getAttribute(Doctrine::ATTR_PK_TYPE), Doctrine::INCREMENT_KEY); - $this->manager->setAttribute(Doctrine::ATTR_LOCKMODE, Doctrine::LOCK_PESSIMISTIC); $this->assertEqual($this->manager->getAttribute(Doctrine::ATTR_LOCKMODE), Doctrine::LOCK_PESSIMISTIC); @@ -88,11 +82,7 @@ class Doctrine_ConfigurableTestCase extends Doctrine_UnitTestCase { $this->assertTrue($e instanceof Exception); $this->connection->commit(); } - try { - $this->manager->setAttribute(Doctrine::ATTR_PK_TYPE,-12); - } catch(Exception $e) { - $this->assertTrue($e instanceof Exception); - } + } public function testGetAttributes() { $this->assertTrue(is_array($this->manager->getAttributes()));