MongoDB support
Need support for
- transactions
- record helpers (haveRecord)
looks like we have to effectively copy paste the entire bunch of record helpers and swap the active record refence to mimic. and for transaction, both connection watcher and transaction forcer is hard refenced to yii/db/Connection, to have transaction support we have to clone them and swap references to yii/mongodb/Connection and yii/mongodb/Transaction.
@samdark - Ideally, can we have a common parent for both yii/db/Connection and yii/mongodb/Connection? something like yii/db/BaseConnection.
Thanks
I'm not using MondoDB myself, so unlikely that I'll do it. If you have any idea on how to implement it, go ahead.
I'm happy to do it as long as you give your thumbs up. My question here is more on is it ok to have a yii/db/BaseConnection and yii/db/BaseTransaction? like we have for active record?
It's better to have interfaces.
I think the record helpers will already work. The mongo AR model extends BaseActiveRecord, which implements ActiveRecordInterface. So we can have the helpers use that as a typehint.
For transactions I'd just do adapt the existing listener to also listen to mongodb connection class, if it exists.