summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDracony <draconyster@gmail.com>2013-01-17 11:46:08 +0200
committerDracony <draconyster@gmail.com>2013-01-17 11:46:16 +0200
commit1bce44813a95fc3e1b16bd3a09ac8af59002933e (patch)
tree5da626add545272e05ae6b13daaa2725ae558fb9
parent87cf317a34bb51947679d8349f31037db076ce4f (diff)
downloadPHPixie-1bce44813a95fc3e1b16bd3a09ac8af59002933e.zip
PHPixie-1bce44813a95fc3e1b16bd3a09ac8af59002933e.tar.gz
PHPixie-1bce44813a95fc3e1b16bd3a09ac8af59002933e.tar.bz2
Fixed bug in orm relations
-rw-r--r--modules/orm/classes/orm.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/orm/classes/orm.php b/modules/orm/classes/orm.php
index 02dfb16..fa69870 100644
--- a/modules/orm/classes/orm.php
+++ b/modules/orm/classes/orm.php
@@ -315,7 +315,7 @@ class ORM {
}
}
$model->query->fields(array("$new_alias.*"));
- if ($target['type'] != 'has_many' && $model->loaded() ) {
+ if ($target['type'] != 'has_many' && $this->loaded() ) {
$model = $model->find();
$this->_cached[$column]=$model;
}