public function getQueryReference($key = '', $foreign = '', $foreignLabel = '', $foreignKey = '', &$i)
    {
        $model      = Norm::factory($foreign);
        $refSchemes = $model->schema();
        $foreignKey = $foreignKey ?: 'id';

        if ($foreignKey == '$id') {
            $foreignKey = 'id';
        }

        $query = $key . ' IN (SELECT '.$foreignKey.' FROM '.strtolower($foreign).' WHERE '.$foreignLabel.' LIKE :f'.$i.') ';
        $i++;

        return $query;
    }