Doctrine 1
  1. Doctrine 1
  2. DC-344

Trouble with auto including generate Base class with specifik name

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major 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

        Activity

        Havelka Ondrej created issue -
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Assignee Jonathan H. Wage [ jwage ] Benjamin Eberlei [ beberlei ]

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Havelka Ondrej
          • Votes:
            3 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: