doctrine/phpcr-odm — pull request #244 by dbu (2013-02-15 14:53:16+00:00)
Title: fix bug about createDocument and multilang

if we load the translations unconditionally, we lose any changes to translated fields when calling createDocument.

looking at the createDocument i really wonder why we load all that information into the $documentState only to at some point check if we actually have the document already and if we do need to refresh it. git blame shows me @lsmith77 and @Seldaek. would any of you know why we should not simply see if we have the document already right at the start of createDocument, and only if we either refresh or not have it we would do the rest of the method? and can you see any issue with moving the loadTranslations into the code that is only done when refreshing is needed?