Skip to content
Snippets Groups Projects
Commit 5ef66b87 authored by Jared Hancock's avatar Jared Hancock
Browse files

orm: Fix magic lookup of one-to-one relations

parent 19491f54
No related branches found
No related tags found
No related merge requests found
......@@ -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',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment