add to_hash method for ids_model
return self