From 6852c7813304c6ab1ba22c993b7c99170aea3ee5 Mon Sep 17 00:00:00 2001 From: Erik Amaru Ortiz Date: Thu, 5 Dec 2013 20:35:55 -0400 Subject: [PATCH] BUG FIX - ORM PROPEL had a litle bug, when selecting tables that have foreign keys --- gulliver/thirdparty/propel/map/TableMap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulliver/thirdparty/propel/map/TableMap.php b/gulliver/thirdparty/propel/map/TableMap.php index 7b1ddc9be..5dac1415e 100755 --- a/gulliver/thirdparty/propel/map/TableMap.php +++ b/gulliver/thirdparty/propel/map/TableMap.php @@ -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);