I'm working on the Doctrine tutorial at http://www.Doctrine-project.org/ and I receive a fatal error when I try to run my generate.php script which makes my models and makes tables in the database:
Fatal error: Class 'BaseCharity' not found in ...\models\Charity.php on line 14
generate.php:
require_once('bootstrap.php');
Doctrine_Core::dropDatabases();
Doctrine_Core::createDatabases();
Doctrine_Core::generateModelsFromYaml('schema.yml', 'models');
Doctrine_Core::createTablesFromModels('models');
and 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)
I am quite stumped by this, I can get it to correctly create other tables that are very similar or much more complicated then this one. I've tried rewriting it as well. I really have no clue where this error is coming from.
Found this:
http://www.doctrine-project.org/jira/browse/DC-344
You need to register the models with the autoloader provided by Doctrine. No need to use any Iterators or what so ever
You can of course use it sevaral times: