Propel Generator - Error occurs when column name has dash in it #493

nikeshhajari opened this Issue Oct 28, 2012 · 4 comments


None yet

5 participants



Not sure if this is a bug, but I noticed that if a column name has a dash in it the object model generation fails.

Example: "Non-Student" as the column name will cause the generation to fail.

Here is the error code:

"The value "Non-Student" is not accepted by the pattern [\w_]+ (Line 442 of AbstractPropelDataModelTask.php

I believe it is ok to have a dash in the column name

chmeliuk commented Nov 1, 2012

@nikeshhajari it's not a bug.
database column names can't contain dash. they may contain basic Latin letters, digits 0-9, dollar, underscore. same rules for php variables.


As @chmeliuk, I think it's not a bug.

@willdurand willdurand closed this Nov 3, 2012

@willdurand yes it's a bug column name could contain dash but it should be escaped, this also depend on the SGBD engine and It is not supported by Propel, but PR with tests are welcome ;)


Why not just enclose the column name with backticks ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment