From 97eeb437b2de44c338b0ebbe9de25209468c7a0c Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Sat, 30 Oct 2010 19:54:36 +0200 Subject: [PATCH] DDC-832 - Fix regression introduced with last commit. --- lib/Doctrine/ORM/Persisters/BasicEntityPersister.php | 10 ---------- .../ORM/Persisters/JoinedSubclassPersister.php | 5 +++-- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php b/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php index 371e67d49..af45218f9 100644 --- a/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php +++ b/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php @@ -392,16 +392,6 @@ class BasicEntityPersister $this->_conn->delete($this->_class->getQuotedTableName($this->_platform), $id); } - /** - * Gets the ClassMetadata instance of the entity class this persister is used for. - * - * @return Doctrine\ORM\Mapping\ClassMetadata - */ - public function getClassMetadata() - { - return $this->_class; - } - /** * Prepares the changeset of an entity for database insertion (UPDATE). * diff --git a/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php b/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php index ec94bbddb..4972ee6b2 100644 --- a/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php +++ b/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php @@ -193,7 +193,8 @@ class JoinedSubclassPersister extends AbstractEntityInheritancePersister $updateData = $this->_prepareUpdateData($entity); if ($isVersioned = $this->_class->isVersioned) { - $versionedTable = $this->_getVersionedClassMetadata()->table['name']; + $versionedClass = $this->_getVersionedClassMetadata(); + $versionedTable = $versionedClass->table['name']; } if ($updateData) { @@ -203,7 +204,7 @@ class JoinedSubclassPersister extends AbstractEntityInheritancePersister // Make sure the table with the version column is updated even if no columns on that // table were affected. if ($isVersioned && ! isset($updateData[$versionedTable])) { - $this->_updateTable($entity, $this->_quotedTableMap[$versionedTable], array(), true); + $this->_updateTable($entity, $versionedClass->getQuotedTableName($this->_platform), array(), true); } } }