Doctrine 1
  1. Doctrine 1
  2. DC-71

classPrefixFiles should affect base classes as well

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2.0-ALPHA1
    • Fix Version/s: 1.2.0-ALPHA3
    • Component/s: Import/Export
    • Labels:
      None

      Description

      ... or there should be a "baseClassPrefixFiles" option.

      I've set the priority of this ticket to minor, but I'd really like this to be implemented so that I don't have to rename files after generating them.

        Activity

        Hide
        Glen Ainscow added a comment - - edited

        Actually, this isn't really what I need. It would work, but it'd be like:

        /models
              /generated
                    User.php               (Blog_Model_Base_User)
              User.php                     (Blog_Model_User)

        I'd prefer it if the generated model file was named BaseUser.php.

        See http://www.nabble.com/Autoloading-Doctrine-models-base-models-td25687101.html

        Show
        Glen Ainscow added a comment - - edited Actually, this isn't really what I need. It would work, but it'd be like: /models /generated User.php (Blog_Model_Base_User) User.php (Blog_Model_User) I'd prefer it if the generated model file was named BaseUser.php. See http://www.nabble.com/Autoloading-Doctrine-models-base-models-td25687101.html
        Hide
        Jonathan H. Wage added a comment -

        I really don't understand what you mean you need to be more descriptive of what you want it to do.

        Show
        Jonathan H. Wage added a comment - I really don't understand what you mean you need to be more descriptive of what you want it to do.
        Hide
        Jonathan H. Wage added a comment -

        I fixed this in 1.2. I think it does what you want now. It was related to this ticket

        http://www.doctrine-project.org/jira/browse/DC-95

        Show
        Jonathan H. Wage added a comment - I fixed this in 1.2. I think it does what you want now. It was related to this ticket http://www.doctrine-project.org/jira/browse/DC-95
        Hide
        Glen Ainscow added a comment -

        Sorry for not being clear. I wanted something like this:

        File Name            Class Prefix        Base Prefix         Model Name
        ----------------------------------------------------------------------
        Post.php             Blog_Model_                             Post        (Blog_Model_Post)
        BasePost.php         Blog_BaseModel_     Base                Post        (Blog_BaseModel_BasePost)

        ... but it's not possible to set a different class prefix for base models. However, I actually think "Blog_Model_BasePost" might be better, and Doctrine does support this. The Zend Framework resource autoloader doesn't though, so I've submitted an issue report there.

        Thanks.

        Show
        Glen Ainscow added a comment - Sorry for not being clear. I wanted something like this: File Name Class Prefix Base Prefix Model Name ---------------------------------------------------------------------- Post.php Blog_Model_ Post (Blog_Model_Post) BasePost.php Blog_BaseModel_ Base Post (Blog_BaseModel_BasePost) ... but it's not possible to set a different class prefix for base models. However, I actually think "Blog_Model_BasePost" might be better, and Doctrine does support this. The Zend Framework resource autoloader doesn't though, so I've submitted an issue report there. Thanks.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: