/** * If this thing basically already exists in the database, we want to update it; * otherwise insert it (ie, someone tweaked the CSV file, or the item was * deleted in the database so it should be re-inserted) * @param type $id_in_csv * @param type $model_object_data * @param EEM_Base $model * @param type $old_db_to_new_db_mapping * @return */ protected function _decide_whether_to_insert_or_update_given_data_from_same_db($id_in_csv, $model_object_data, $model) { //in this case, check if this thing ACTUALLY exists in the database if ($model->get_one_conflicting($model_object_data)) { return self::do_update; } else { return self::do_insert; } }