CakePHP using multiple databases for models

前端 未结 3 1213
野性不改
野性不改 2021-01-06 06:19

Is it possible for certain models to be in one database and other models in another (using the same connection)?

I have a number of read-only tables that I want shar

3条回答
  •  一生所求
    2021-01-06 06:57

    I've built a site in CakePHP that has models using different databases and I never had problem with joins across different databases - the framework seemed to take care of all that for me. Though you might need to explicitly state the database tables used in your models to get it to work.

提交回复
热议问题