OGM-397

Based on top of https://github.com/hibernate/hibernate-ogm/pull/249