First, what doctrine are you talking about, 1 or 2?
This is a huge difference. The only thing they have is that they are both full-fledged ORM-s. Otherwise, there is no connection between them.
Doctrine 1 is based on ActiveRecords, Doctrine 2 is based on the Data mapping template.
Both can do the same, but there are some significant differences between them.
Generally speaking, the Data Mapper is less "developer friendly", but should have better performance. What for? This is actually quite simple. With active records, each entity knows everything "around" itself, its relationship with other objects, etc. Using a data transfer, entities are dumb and light; there is a central object (EntityManager / UnitOfWork in Doctrine2) that handles all relationship relationships. So, in terms of memory usage and performance, the Data Mapper should be faster.
Doctrine guys say that Doctrine2 is 50% faster than Doctrine1 (there are other differences, not just the design pattern).
If you feel this, you can even implement ActiveRecords on the Doctrine2 data mapper. Take a look at this blog post . I use this approach only for the development phase to save as little code as possible. Once it starts working, I will kill the extra ActiveRecords layer and roll back to the default data collector Doctrine2.
So, the conclusion is that you can do everything with both, but you can also say that you can do everything with raw SQL. If you are new to the ORM world, I would suggest going with ActiveRecords because it is simple and (usually) requires less code. On the other hand, if you are building a large, complex model, I think the data mapper is the best option.
Maybe something is wrong with me, but I understand.
Regarding the comparison of CodeIgniters ActiveRecords and Doctrine (1 or 2), I cannot say because I have never used CodeIgniter. One thing I'm sure of, Doctrine has a lot more features than ORM CodeIgniters. For example: hydration of the result, inheritance (separate table, class table), prefetching, lazy loading, additional lazy loading, extensions, behavior, optimization, proxies, data processing per day ... This is a massive and full-fledged ORM with a lot of my experience working with any "ORM Framework by default" is that their main goal is to be as simple as possible, so a beginner can easily handle this. The doctrine is a powerful beast, and it can certainly do many things in a more efficient and / or logically more correct way than the built-in ORM CodeIgniter. The disadvantage is that it takes more time to learn and encode, and it is a huge library with thousands of files, so just to run it all adds some overhead compared to a lighter alternative.