I’ve created a test for this problem here: https://github.com/clementdenis/hibernate-orm/pull/1 (in my own fork for now as it does not include any fix).