merged entitiesToInsert and entitiesToUpdate