foreignObject = $foreignObject; $this->remoteField = $remoteField; $this->localElement = $localElement; } /** * Get the data of the relation */ function get() { return $this->foreignObject::findMany(array($this->remoteField => array('=', $this->localElement->id))); } }