[Catalyst] connecting to more than one database
Bruce J Keeler
bruce at drangle.com
Thu Jul 3 18:39:08 BST 2008
jagdish eashwar wrote:
> Putting all the tables in one database is a solution. I am afraid,
> however, that when I create a model using script/MyApp_create.pl for a
> specific Catalyst application, I'll get all the tables in the
> database into my DBIC schema. Is there a way of making
> MyApp_create.pl pick up only a subset of the tables?
I don't know if mysql has a facility similar to Oracle's synonyms
whereby you could alias tables from the common schema into the
app-specific one. If not, it's possible that a simple views might work,
create view employee as (select * from common.employee)
Then just put all of the tables into the same DBIC schema.
More information about the Catalyst