Allow string hash values on AR order method

Rebased code for #10732

Closes  #10732

/cc @senny