开发者

Can doctrine Transaction also includes other queries run by codeigniter database library

So Doctrine is very nice so the Code Igniter is .. both are well and different things, 开发者_开发百科 I am using CI+Doctrine.. but sometimes CI's active record seems to be easy for simpler queries. but now what about transactions.. can i beginTransaction() from Doctrine Connection and then comit or roll back with some CI's database queries ..

Can i do this ... means rollback will rollback every sql run by Doctrine as well as by CI ...

Thanks in Advance ...


Transactions are connection-based. This means that Doctrine can have an ongoing transaction while CI fetches data from elsewhere as long they have their own connection resource to the database.

Fetching data from the database while having a transaction running isn't the way to go. You should collect the needed data before starting the transaction.

In addition, having model logic split across multiple classes seems like a clear case of code smell.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜