We are now in a situation on a project that we need manipulate multiple user entities at once. By example we will disable 50 users at once. Normally we did that in a gateway
Gateway
- Query the data at once by the gateway with a query
OR
- Loop through multiple users
- Load entity
- Manipulate data
- validate
- save()
But that is not the best practice solution.
The first option overrule the possibility to validate the data. The second is not good performing, because we need iterate the entity for all users
What do you suggest? We want a fast solution, but also a save solution
Hope someone know the right solution. Thanks!
When we use the