public function ref($defaults = [])
{
$m = parent::ref($defaults);
// If model is not loaded, then we are probably doing deep traversal
if (!$this->owner->loaded() && isset($this->owner->persistence) && $this->owner->persistence instanceof Persistence_SQL) {
$values = $this->owner->action('field', [$this->our_field]);
return $m->addCondition($this->their_field ?: $m->id_field, $values);
}
return $m;
}