BUG FIX - ORM PROPEL had a litle bug, when selecting tables that have foreign keys

This commit is contained in:
Erik Amaru Ortiz
2013-12-05 20:35:55 -04:00
parent 2398200adf
commit 6852c78133

View File

@@ -300,7 +300,7 @@ class TableMap {
$col = new ColumnMap($name, $this);
if ($fkTable && $fkColumn) {
if (substr($fkColumn, '.') > 0 && substr($fkColumn, $fkTable) !== false) {
if (substr_count($fkColumn, '.') > 0 && substr($fkColumn, strlen($fkTable)) !== false) {
$fkColumn = substr($fkColumn, strlen($fkTable) + 1);
}
$col->setForeignKey($fkTable, $fkColumn);