@strapi/database 5.54.0 → 5.55.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -342,12 +342,19 @@ const createEntityManager = (db)=>{
342
342
  params
343
343
  });
344
344
  const metadata = db.metadata.get(uid);
345
- const { where, data } = params;
345
+ const { data } = params;
346
346
  const dataToUpdate = processData(metadata, data);
347
347
  if (isEmpty(dataToUpdate)) {
348
348
  throw new Error('Update requires data');
349
349
  }
350
- const updatedRows = await this.createQueryBuilder(uid).where(where).update(dataToUpdate).execute();
350
+ // Same pick set as count and deleteMany. See deleteMany for why.
351
+ const updatedRows = await this.createQueryBuilder(uid).init(pick([
352
+ '_q',
353
+ 'where',
354
+ 'filters'
355
+ ], params)).update(dataToUpdate).execute({
356
+ mapResults: false
357
+ });
351
358
  const result = {
352
359
  count: updatedRows
353
360
  };