Replace saveOrUpdate with merge