the check for ``attribute`` needs to be removed if we merge https://github.com/doctrine/phpcr-odm/pull/352