Test case for hibernate bug HHH5645