We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

unknown model or alias phalcon

Help

*Unknown model or alias 'CaseGame' (11), when preparing: SELECT [Items]. FROM [Items] JOIN [CaseGame] AS [case] ON Items.caseid = CaseGame.id ORDER BY items.id **

$items = Items::query()->join('CaseGame', 'Items.caseid = CaseGame.id','case') ->order("items.id")->execute();

Hey, you have to use the whole namespace for the model. In my case it is \Models\ModelName.

Does CaseGame is in any namespace ? If yes then you need to provide FQN. You can use model namespace aliases in modelsManager so you can do something like M:CaseGame.