phalcon/cphalcon · error · Phalcon\Mvc\Model\Query\Exceptions\UnknownJoinType

Unknown join type {type}, when preparing: {phql}

Error message

Unknown join type {type}, when preparing: {phql}

What it means

Error "Unknown join type {type}, when preparing: {phql}" thrown in phalcon/cphalcon.

Source

Thrown at phalcon/Mvc/Model/Query.zep:2562

        switch type {
            case PHQL_T_INNERJOIN:
                return "INNER";

            case PHQL_T_LEFTJOIN:
                return "LEFT";

            case PHQL_T_RIGHTJOIN:
                return "RIGHT";

            case PHQL_T_CROSSJOIN:
                return "CROSS";

            case PHQL_T_FULLJOIN:
                return "FULL OUTER";
        }

        throw new UnknownJoinType(type, this->phql);
    }

    /**
     * Processes the JOINs in the query returning an internal representation for
     * the database dialect
     */
    final protected function getJoins(array select) -> array
    {
        var models, sqlAliases, sqlAliasesModels, sqlModelsAliases,
            sqlAliasesModelsInstances, modelsInstances, fromModels,
            manager, selectJoins, joinItem, joins, joinData, schema, source,
            model, realModelName, completeSource, joinType, aliasExpr, alias,
            joinAliasName, joinExpr, fromModelName, joinAlias, joinModel,
            joinSource, preCondition, modelNameAlias, relation, relations,
            modelAlias, sqlJoin, sqlJoinItem, selectTables, tables, tableItem;
        array sqlJoins, joinModels, joinSources, joinTypes, joinPreCondition,
            joinPrepared;

View on GitHub (pinned to b7419de9cd)

When it happens

Trigger: Thrown at phalcon/Mvc/Model/Query.zep:2562 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of phalcon/cphalcon@b7419de9cd (2026-08-21). Data as JSON: /api/errors/5345e6dc5068dbae. Report an issue: GitHub.