hibernate casting fix