make PHPCR ODM 5.6 compatible by fixing the bug with creating new class instances