if save a object with method 'toArray()' or 'to_array()',convert the
object into array.