A fix was merged in https://github.com/hibernate/hibernate-orm/pull/2800 ; it will be released in 5.4.2 . Thanks for the detailed reports!