Hi,
it try to combine some orm and odm stuff. All examples i made are done with the phpcr-odm.
I try to understand the lazy-loading of collections, cause i need to do same when loading documents that are
referenced by an entity.
But from beginning: When i understand it right, doctrine helps while loading collections. It doesn't query for every item in a collection if it isn't realy needed, means if it isn't asked for. Atm i create a project where i need to load some documents that are referenced in an entity on my own. All references in one world (ORM or ODM) will end up with a list of proxies. But as i am loading the document on my own i would like to have an equal solution for that.
But how do i load the documents? I have stored an uuid of the documents in every entity, so i have got a (almost) unique reference. I created a DocumentAwareEntityInterface
that looks like that: