{"record":{"id":"542eea03064902fe","repo":"phalcon/cphalcon","slug":"a-dependency-injection-container-is-required-to-ac-542eea","errorCode":null,"errorMessage":"A dependency injection container is required to access the services related to the ORM","messagePattern":"A dependency injection container is required to access the services related to the ORM","errorType":"exception","errorClass":"Phalcon\\Mvc\\Model\\Exceptions\\ManagerOrmServicesUnavailable","httpStatus":null,"severity":"error","filePath":"phalcon/Mvc/Model/Query/Builder.zep","lineNumber":1075,"sourceCode":"            }\n        }\n\n        return phql;\n    }\n\n    /**\n     * Returns the query built\n     */\n    public function getQuery() -> <QueryInterface>\n    {\n        var query, bindParams, bindTypes, phql, container;\n\n        let phql = this->getPhql();\n\n        let container = <DiInterface> this->container;\n\n        if unlikely typeof container != \"object\" {\n            throw new ManagerOrmServicesUnavailable();\n        }\n\n        /**\n         * Gets Query instance from DI container\n         */\n        let query = <QueryInterface> container->get(\n            Query::class,\n            [phql, container]\n        );\n\n        // Set default bind params\n        let bindParams = this->bindParams;\n        if typeof bindParams == \"array\" {\n            query->setBindParams(bindParams);\n        }\n\n        // Set default bind types\n        let bindTypes = this->bindTypes;","sourceCodeStart":1057,"sourceCodeEnd":1093,"githubUrl":"https://github.com/phalcon/cphalcon/blob/b7419de9cd0a8a3f48441ead84c9f8415d463e25/phalcon/Mvc/Model/Query/Builder.zep#L1057-L1093","documentation":"Error \"A dependency injection container is required to access the services related to the ORM\" thrown in phalcon/cphalcon.","triggerScenarios":"Thrown at phalcon/Mvc/Model/Query/Builder.zep:1075 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b7419de9cd0a8a3f48441ead84c9f8415d463e25","analyzedAt":"2026-08-21T06:21:18.811Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}