doctrine/phpcr-odm — pull request #548 by ElectricMaxxx (2014-08-15 10:26:53+00:00)
Title: [WIP] refactor findMany()

Lets start with this one here...

The main purpose is to avoid many queries for `DocumentManager::findMany()`. The first step would be done with https://github.com/jackalope/jackalope-doctrine-dbal/pull/210 (when this occurs in other implementations, it should be solved too).
Here i solve the problem with many queries by creating the translation for every document. This problem occurs in `ChildTranslationStrategy` only, as they need to get a kind of a child node. Cause of that i created a `TranslationsNodesWarmer` (open for better names), which provide a method to pre-fetch all translations of a list of nodes.

Btw: i created a `getOrCreateDocument()` method in the UoW to handle that easier.

I did not look at any tests, just wanna show the idea.