When I call this (and other relation methods) method from behaviors (I have such a need), I get this message:
ValueError: Could not parse 'The method "hasMany" doesn't exist on model "Name\Space\Model"
at the same time:
die(var_dump($model instanceof Phalcon\Mvc\Model, method_exists("hasMany", get_class($model))));
produces
bool(true)
bool(false)
The inheritance is the following: Phalcon\Mvc\Model -> MyBaseModel -> MyModel
Phalcon version 1.3.0