Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Generating entity classes for tables with columns whose names start with a number #715

Open
joeyb9686 opened this Issue Jul 6, 2013 · 1 comment

Comments

Projects
None yet
2 participants

When you use propel from the command line to generate entity classes based upon a pre-existing table, you run into problems if a column name starts with a number.

I believe this is a perfectly valid way to name columns.

However, internally, the BaseXXXQuery class, and BaseXXXQueryPeer name variables and constants after the column name. In the event that a column name begins with a numeric character, the classes fail to parse because of the constant / variables whose identifiers are not allowed to begin with numbers.

A solution, presumably would be to strip leading numeric characters from the beginning of the variables and constants (I don't believe these need to mirror the column name) (and check for potential collisions).

Member

jaugustin commented Jul 6, 2013

if you write your own schema.xml I think you could play with phpname / columnName to by pass this issue
http://propelorm.org/reference/schema.html#column-element

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