added Table::with()
[m6w6/pq-gateway] / lib / pq / Gateway / Table / Relations.php
index ab74d4060b23bdd49b7d795aa8b29101b2486cb7..7ad5326a84931c84f7fe1c8e40bcc747ad48c913 100644 (file)
@@ -46,7 +46,7 @@ class Relations
                        $table->getQueryExecutor()->execute(
                                new \pq\Query\Writer(RELATION_SQL, array($table->getName())),
                                function($result) use($table, $cache) {
-                                       $this->references = $result->map(array(0,1), array(2,3,4), \pq\Result::FETCH_OBJECT);
+                                       $this->references = $result->map(array(0,1), array(1,2,3,4), \pq\Result::FETCH_OBJECT);
                                        $cache->set("$table#relations", $this->references);
                                }
                        );