OGM-398

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