HHH-9369 Fix @Formula of enum type results in ClassCastException