[Dbix-class] Data partitioning and DBIC

Ash Berlin ash_cpan at firemirror.com
Wed Apr 4 11:02:20 GMT 2007


Oleg Pronin wrote:
> As far as i know there is not.
> There is no way to execute select with joining two tables in different 
> databases so the relationships are useless.
> 
>  

That depends entierly on your definition of database. If you are talking 
about the MySQL definition of database, then yes you can by changing the 
table from

->table('foo')

to

->table('db.foo')

So long as they are on the same host and the same user can access both.

If you want to do this at some arbitrary point in time, I thinjk you 
have to do something like the following:

$schema->source('Foo')->table('db.foo')

Completely untested mind.

HTH

-ash



More information about the Dbix-class mailing list