I have the update code like this: db.Model(&models.DailyPlan{}). Where("daily_plan_id IN ?", dailyPlanIds).