summaryrefslogtreecommitdiff
path: root/kohana/libraries/ORM.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-12-25 10:24:29 +0000
committerBharat Mediratta <bharat@menalto.com>2008-12-25 10:24:29 +0000
commitb91992187d732c07854fd185e201eff84125a636 (patch)
treeb06d734726f5ac274944cb998a7c879fe30e7759 /kohana/libraries/ORM.php
parent318591526459e1ac1bb8b0acbbcf4bf9f02f8e88 (diff)
Updated Kohana to r3845
Diffstat (limited to 'kohana/libraries/ORM.php')
-rw-r--r--kohana/libraries/ORM.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/kohana/libraries/ORM.php b/kohana/libraries/ORM.php
index 7fe126c9..99a8dc4f 100644
--- a/kohana/libraries/ORM.php
+++ b/kohana/libraries/ORM.php
@@ -1408,6 +1408,9 @@ class ORM_Core {
*/
protected function load_relations($table, ORM $model)
{
+ // Save the current query chain (otherwise the next call will clash)
+ $this->db->push();
+
$query = $this->db
->select($model->foreign_key(NULL).' AS id')
->from($table)
@@ -1415,6 +1418,8 @@ class ORM_Core {
->get()
->result(TRUE);
+ $this->db->pop();
+
$relations = array();
foreach ($query as $row)
{