【发布时间】:2010-07-22 17:45:43
【问题描述】:
我正在http://www.Doctrine-project.org/ 上编写 Doctrine 教程,当我尝试运行生成模型并在数据库中创建表的 generate.php 脚本时收到一个致命错误:
Fatal error: Class 'BaseCharity' not found in ...\models\Charity.php on line 14
生成.php:
require_once('bootstrap.php');
Doctrine_Core::dropDatabases();
Doctrine_Core::createDatabases();
Doctrine_Core::generateModelsFromYaml('schema.yml', 'models');
Doctrine_Core::createTablesFromModels('models');
和 schema.yml
Charity:
actAs: [Timestampable]
columns:
active:
type: boolean
default: '1'
owed: decimal(32,2)
totalPayed: decimal(32,2)
name: string(255)
website: string(255)
description: text
icon: string(255)
我对此感到很困惑,我可以让它正确地创建其他非常相似或更复杂的表。我也试过重写它。我真的不知道这个错误是从哪里来的。
【问题讨论】: