Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.2.0-ALPHA1, 1.2.0-ALPHA2, 1.2.0-ALPHA3, 1.2.0-BETA1
-
Fix Version/s: 1.2.0-BETA2
-
Component/s: Import/Export, Inheritance, Record
-
Labels:None
Description
I use Symfony 1.2.9 with Doctrine 1.2 trunk.
I also make use of the new Doctrine's feature to specify custom table class. For that, in the config/ProjectConfiguration.class.php I have the following code:
public function configureDoctrine(Doctrine_Manager $manager)
{
...
$manager->setAttribute(Doctrine::ATTR_TABLE_CLASS, 'Platform_DoctrineTable');
...
}
And that works fine. But when I comment out this line and re-generate model classes, I get broken table class definitions like:
class AccountTable extends
{
}
Notice the lack of base class name.
It seems the problem resides in Doctrine_Import_Builder's constructor:
public function __construct() { $this->_baseTableClassName = Doctrine_Manager::getInstance()->getAttribute(Doctrine_Core::ATTR_TABLE_CLASS); $this->loadTemplate(); }
So, the default value of $this->_baseTableClassName always overwrites by Doctrine_Core::ATTR_TABLE_CLASS attribute value.
Proposed patch attached.