propelorm/Propel — Issue #233: BasePeer::buildTableMap(): class TableMap not found in namespaced classes
Author: kstorch
Created: 2011-12-15 09:00:29+00:00
State: open

For generated classes in namespaces, the associated generated BasePeer class contains the static function buildTableMap(), where the class TableMap is referenced without namespace. As result, the script fails with a class not found error.

Instead of
```
$dbMap->addTableObject(new TableMap());
```
the correct code is
```
$dbMap->addTableObject(new \TableMap());
```
Alternatively, one could use a "use"-statement instead.