Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #828 #829

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -7,6 +7,7 @@ branches:
- gh-pages

php:
- 5.2
- 5.3
- 5.4
- 5.5
Expand Down
4 changes: 3 additions & 1 deletion generator/lib/builder/om/PHP5PeerBuilder.php
Expand Up @@ -589,6 +589,8 @@ public static function get{$col->getPhpName()}SqlValue(\$enumVal)
protected function addBuildTableMap(&$script)
{
$this->declareClassFromBuilder($this->getTableMapBuilder());
// support for namespaces requires global namespace prefix
$ns = version_compare(PHP_VERSION, '5.3.0', '>=') ? "\\": "";
$script .= "
/**
* Add a TableMap instance to the database for this peer class.
Expand All @@ -597,7 +599,7 @@ public static function buildTableMap()
{
\$dbMap = Propel::getDatabaseMap(" . $this->getClassname() . "::DATABASE_NAME);
if (!\$dbMap->hasTable(" . $this->getClassname() . "::TABLE_NAME)) {
\$dbMap->addTableObject(new \\" . $this->getTableMapClass() . "());
\$dbMap->addTableObject(new " . $ns . $this->getTableMapClass() . "());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please revert everything despite the changes in this file

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverted.

}
}
";
Expand Down