Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.2.1
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:Linux, Ubuntu 9.04 64b
Description
I have found a problem during testing example model on page http://www.doctrine-project.org/documentation/cookbook/1_1/en/code-igniter-and-doctrine . A use YAML model with object name UserGroup and call method Doctrine_Core::createTablesFromModels('models'); process faling with error:
Fatal error: Class 'BaseUserGroup' not found in /sourcepath/models/UserGroup.php on line 13
Generate model file included abstract class BaseUserGroup exist and is OK. If I include BaseUserGroup manuly or rename object "UserGroup" on "UserGroups" everithing work fine. I thing here is a problem with autoloding base class with specifik name.
Here is my code example:
Doctrine_Core::dropDatabases();
Doctrine_Core::createDatabases();
Doctrine_Core::generateModelsFromYaml('sourcepath/yaml/model.yml', 'models');
Doctrine_Core::createTablesFromModels('models');
Trouble shotting YAML model is:
—
UserGroup:
columns:
user_id:
type: integer(4)
primary: true
group_id:
type: integer(4)
primary: true