tablePrefix and phpName in schema.yml #174

wants to merge 1 commit into

2 participants


I would use the "tablePrefix" attribute in the main configuration of the schema.yml

I'm using the "phpName" attribute on each table to do not add the prefix to the generated classname.
As the phpName is the same as the table_name (before prefix is added), the "phpName" attribute is not written to the "generated-schema.xml" file.

    package: lib.model
    defaultPhpNamingMethod: phpname
    table_prefix: cds_

      _attributes: { phpName: Atlas }
      id: ~
      name: { type: varchar, size: 50 }

Generated class files are

  • CdsAtlas.php
  • CdsAtlasQuery.php
  • CdsAtlasPeer.php

and I assume they should be

  • Atlas.php
  • AtlasQuery.php
  • AtlasPeer.php

Sorry for my english.

Djules Update lib/addon/sfPropelDatabaseSchema.class.php
Always write phpName to properly add "tablePrefix" attribute only to tableName if attribute exists
Propel member

Did you run the test suite? You broke some tests. Thanks for the PR though. Could you fix the tests?


I'm sorry but I'm new to GitHub and I don't know how to run tests. Could you merge the modifications I've made and test for me ?

Propel member

That's what I did and why I told you you broke the testsuite.

Running the testsuite is quite simple. First run the following command to initialize the test suite:


Then, run the tests:

php mockproject/plugins/sfPropelORMPlugin/test/bin/prove.php
@willdurand willdurand closed this Dec 22, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment