unknown model or alias phalcon


*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.