HHH-5811 : Flush causes update query on field of type Byte[]

(cherry picked from commit 4007655045711ddf89925c76310f31f81530dfa6)