Doctrine 1
  1. Doctrine 1
  2. DC-123

generate-sql creates a create table statement for every type when using inheritance with column_aggregation

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Can't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      entity:
      columns:
      id:
      type: integer(4)
      primary: true
      notnull: true
      name:
      type: string(200)

      company:
      inheritance:
      extends: entity
      type: column_aggregation
      keyField: type
      keyValue: company

      person:
      inheritance:
      extends: entity
      type: column_aggregation
      keyField: type
      keyValue: person

      generates 3 times a create table statement for entity when i call "generate-sql" via the CLI command:
      CREATE TABLE entity (id INT, name VARCHAR(200), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 ENGINE = InnoDB;
      CREATE TABLE entity (id INT, name VARCHAR(200), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 ENGINE = InnoDB;
      CREATE TABLE entity (id INT, name VARCHAR(200), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 ENGINE = InnoDB;

        Activity

        Hide
        Jonathan H. Wage added a comment -

        I had a look at this and we have no real good way to fix it as the whole inheritance implementation in Doctrine 1 is severely flawed. This works properly in Doctrine 2 though.

        Show
        Jonathan H. Wage added a comment - I had a look at this and we have no real good way to fix it as the whole inheritance implementation in Doctrine 1 is severely flawed. This works properly in Doctrine 2 though.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Lukas Kahwe
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: