Uploaded image for project: 'Doctrine 1'
  1. Doctrine 1
  2. DC-570

Make table classes suffix configurable (with patch)

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2.1
    • Fix Version/s: 1.2.2
    • Component/s: Attributes, Import/Export
    • Labels:
      None

      Description

      I follow Zend Framework (PEAR) class naming conventions, and my user table class should be named User_Table instead of UserTable and be placed in User/Table.php instead of UserTable.php. Since Table suffix is hardcoded, it's not possible to do that.

      I added ATTR_TABLE_CLASS_SUFFIX attribute and set it to Table by default, so that existing code is not affected. Now, if I want, I can change that prefix to _Table and be happy. The patch is attached.

        Activity

        Hide
        jwage Jonathan H. Wage added a comment -

        I like the idea, but the patch is not quite right. We should not use an attribute for this, it should just be an option in the builder. I committed a fix for this and should solve your problem.

        Show
        jwage Jonathan H. Wage added a comment - I like the idea, but the patch is not quite right. We should not use an attribute for this, it should just be an option in the builder. I committed a fix for this and should solve your problem.
        Hide
        jwage Jonathan H. Wage added a comment -

        Just a note, my previous comment is wrong. We do need this to be an attribute so that the Connection.php can load the tables too with the right format.

        Show
        jwage Jonathan H. Wage added a comment - Just a note, my previous comment is wrong. We do need this to be an attribute so that the Connection.php can load the tables too with the right format.

          People

          • Assignee:
            jwage Jonathan H. Wage
            Reporter:
            elnur Elnur Abdurrakhimov
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: