[WIP] Fixes for PHPCR-ODM

This PR will hopefully succeed in getting the PHPCR-ODM implemntation working.