Skip to content

Instantly share code, notes, and snippets.

@Hafiz-SE
Last active January 10, 2021 10:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hafiz-SE/53a6b902c732e9d75d99cee19fb089a3 to your computer and use it in GitHub Desktop.
Save Hafiz-SE/53a6b902c732e9d75d99cee19fb089a3 to your computer and use it in GitHub Desktop.
public boolean createPresent (long id) {
List<Employee> employees = employeeService.getAllEmployees(); //returns 500+ employees.
for (Employee employee : employees) {
//lots of business logic.
//more than 5 database calls
//calculations
//logging
entityManager.clear();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment