Fix #2244 add judge conditions in `Phalcon\Mvc\Model\Manager::getRelationRecords`

See #2244