diff --git a/include/class.orm.php b/include/class.orm.php index 8a06eb6ee326e029da4577230101c863ecc3af6f..46a6d6b83737d4908efa10dd678e673180440bc5 100644 --- a/include/class.orm.php +++ b/include/class.orm.php @@ -46,7 +46,8 @@ class VerySimpleModel { // TODO: Support instrumented lists and such $j = static::$meta['joins'][$field]; $class = $j['fkey'][0]; - $v = $this->ht[$field] = $class::lookup($this->ht[$j['local']]); + $v = $this->ht[$field] = $class::lookup( + array($j['fkey'][1] => $this->ht[$j['local']])); return $v; } throw new OrmException(sprintf('%s: %s: Field not defined',