Doctrine 1
  1. Doctrine 1
  2. DC-348

Doctrine manual does not document that columns can be added with simple inheritance, or the semantics of accessing those columns in the parent

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.1
    • Fix Version/s: None
    • Component/s: Documentation
    • Labels:
      None

      Description

      The Doctrine manual's section on inheritance mentions simple inheritance only briefly. The examples do not show that columns can be added, nor do they explain that the parent model class can also access those columns (very useful when you override its methods at the application level in Symfony).

      Both behaviors are supported (Jon suggested I take advantage of them at one point) but it's easy to miss the fact that they are available. For a long time I assumed column aggregation inheritance was the only way to add columns.

      I'm now exploiting simple inheritance as a way to add columns to sfGuardUser rather than introducing an sfGuardUserProfile class with all of the attendant problems of trying to pretend two tables are actually one table. This is very useful.

      (Out of curiosity, is there an alternative way to add columns to plugin schemas at the app level in Symfony 1.3 similar to the way it's now done for Propel?)

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Tom Boutell
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: