all:
database1:
class: sfPropelDatabase
param:
dsn: pgsql://foo:bar@hostname/database1
database1:
class: sfPropelDatabase
param:
dsn: pgsql://foo:bar@hostname/database1
database2:
class: sfPropelDatabase
param:
dsn: mysql://foo:bar@hostname/database2
先建立一个
PROJECT_DIR/config/database1.schema.xml
再建立一个
PROJECT_DIR/config/database2.schema.xml
最后build一下:
$ symfony propel-build-model
$database2_connection_handler = Propel::getConnection(BarPeer::DATABASE_NAME);