Update requires data, Getting this error while updateMany

System Information
  • 4.4.5:
  • MAC:
  • MYSQL:
  • v18.12.1:
  • 8.19.2:
  • No Yarn:

Screenshot 2022-12-30 at 12.42.14 PM

I am using updateMany as per the docs of Strapi Show Here

But I am getting an error that shows that
error: Update requires data

I just want to update pre_order value from cart table which is filter by user

1 Like

Hey, did you figure it out?

The problem is, that you want to update a relation field of cart. It seems like updateMany can’t do that at the time, however the documentation is cloudy about it. So I don’t know, whether its a bug or the feature is missing. But it would be useful!!!

It would be really great if this is documented, I’ve been trying for an hour pulling my hear out why this wouldnt work…

I have a similar thing. These ‘strapi-isms’ as we call them at work now are so annoying.

I am doing the same query and getting the error:

update "public"."ticket_purchases" set "status" = $1 where ("t2"."id" in ($2)) - missing FROM-clause entry for table "t2"
error: update "public"."ticket_purchases" set "status" = $1 where ("t2"."id" in ($2)) - missing FROM-clause entry for table "t2"