Open evoactivity opened 7 months ago
We should patch it to do creation of strings in one go using fetchOrCreateMany then merging the array.
PR welcome
We should patch it to do creation of strings in one go using fetchOrCreateMany then merging the array.
FWIW, I view that as two separate issues.
Issue 1: It's currently not possible to assign roles inside of an ongoing transaction.
Issue 2: Assigning multiple roles results in querying the roles table multiple times.
Agreed
I am running into problems where
.assignRole
is creating a new transaction and using up my transaction pool when used in a loop (think importing users from a CSV).Patching the package so it uses the current models transaction fixes my issue.
I guess this should be done for
syncRoles
andrevokeRole
as well.