syncPermissions
performs too many queries
#2419
-
I'm trying to update a role with the new given permissions that is my code to update
Thanks for everyone ❤ |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
yes, it seems to be a something wrong with your code |
Beta Was this translation helpful? Give feedback.
-
is the expected behavior of laravel sync, with |
Beta Was this translation helpful? Give feedback.
-
@MohammedElattar A fix has been implemented. You can test it by upgrading to |
Beta Was this translation helpful? Give feedback.
-
I have SAAS permissions for multiple tenants. I want to update permissions all at once. There are 1,000 tenants, 5 roles, and 300 permissions. If I use syncPermissions, it will crash. It is faster to operate the data table directly. |
Beta Was this translation helpful? Give feedback.
https://laracasts.com/discuss/channels/eloquent/eloquent-sync-method-does-separate-insertupdate-query-for-each-item
is the expected behavior of laravel sync, with
attach
we could get a single combined sql