This is my current workaround for hibernate 5.2 https://stackoverflow.com/a/48819098/728602 and just using merge