I'm pretty sure this was fixed in hibernate 5 but I couldn't find the issue for it to link this. Could you maybe try the latest hibernate 5.0 or 5.1 to see if it works there?