Doctrine_Core::createTablesFromModels() 失败并出现以下错误:
Fatal error: Uncaught exception 'Doctrine_Connection_Mysql_Exception' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'newmexicocreates.address_type' doesn't exist. Failing Query: "SELECT a.id AS a__id, a.title AS a__title FROM address_type a"' in /[removed]/lib/doctrine/Doctrine/Connection.php:1082
Stack trace:
#0 /[removed]/lib/doctrine/Doctrine/Connection.php(1025): Doctrine_Connection->rethrowException(Object(PDOException), Object(Doctrine_Connection_Mysql), 'SELECT a.id...')
#1 /[removed]/lib/doctrine/Doctrine/Query/Abstract.php(976): Doctrine_Connection->execute('SELECT a.id...', Array)
#2 /[removed]/lib/doctrine/Doctrine/Query/Abstract.php(1026): Doctrine_Query_Abstract->_execute(Array)
#3 /[removed]/app/models/behaviors/IdAsConstant.php(16): Doctrine_Query_Abstract->execute()
#4 /[removed]/ in /[removed]/lib/doctrine/Doctrine/Connection.php on line 1082
我认为这种情况正在发生,因为它看到了模型中定义的关系并试图创建约束。但他们正在处理的表尚未创建。我在这个假设中正确吗?
有什么我可以尝试解决的吗?