OGM-391

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