public static function getFrom($condition, $model) {
        if (is_a($condition, '\\mpf\datasources\\sql\\ModelCondition')) {
            $condition->model = $model;
            return $condition;
        }
        if (is_array($condition) && count($condition))
            $cond = new static($condition);
        else {
            $cond = new static;
            if ($condition)
                $cond->addCondition($condition);
        }
        $cond->model = $model;
        return $cond;
    }