PsychoX
PsychoX

Reputation: 1098

Yii: MySQL and MongoDB together

I'm starting quite big project in Yii framework and I'll need to work on MySQL and MongoDB together. And I wanted to ask, if someone have any experience working with this two databases and Yii together. Is it possible to use (for example) YiiMongoDBSuite Yii plugin, and choose which database to query? Or will I need to rewrite some of the Yii functionality to achieve this? What are best practices to to use this two databases together?

Upvotes: 0

Views: 501

Answers (1)

Sammaye
Sammaye

Reputation: 43884

Each extension will (should) take different configuration variables from the main.php config. CActiveRecord will take db and ymds will take mongodb. As such keeping the models between MySQL and MongoDB separate (repicate models between CActiveRecord and ymds) should be enough to use both databases together with Yii.

Upvotes: 1

Related Questions