propelorm/Propel — Issue #307: Data dump not working with some table names
Author: lrlopez
Created: 2012-03-03 13:13:15+00:00
State: open

On PropelDataDumpTask.php there is the following call (@line 338):

$rowNode = $doc->createElement($tbl->getPhpName());

This will work if the PHP name of the table is a valid XML tag. This implies that:

- It doesn't start with a number or punctuation char.
- It doesn't start with XML, regardless of its case.

Should not be the case, propel-gen will fail with the following exception:
[phing] Invalid Character Error

I.e.: If a table is named "0001_activity" or "XMLresponses", the dump won't work.

There should be a mechanism to escape the table name that is also recognized by the tasks that use dumps, like "datasql".

If it is not possible to fix the problem, may be possible to have this behavior documented? I've wasted days with my project halted until I found what the problem was.