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

Any workaround for using underscore in classname?

Hi There,

I'm new to phalcon, I'm having one of my project developed in ember and html5 and I want to migrate it in phalcon. Now the issue is losts of my table name contains underscore in it and I can't affort renaming them. So is there any workaround to get things working?



6.4k
Accepted
answer

class MyModel extends PhalconModel {
    public function getSource() {
        return 'my_model_table_name';
    }
}


1.2k

Thanx Oscar, it works :)


class MyModel extends PhalconModel {
  public function getSource() {
      return 'my_model_table_name';
  }
}