[model] avoid infinite loop in to_hash. need to consult some experts T_T