forked from digma-ai/forkof-spring-petclinic
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Description
There is an N+1 query performance issue in the /owners endpoint causing multiple repeated database queries. This is caused by:
- Eager loading of pets collection in the Owner entity
- Inefficient queries in the OwnerRepository
- Loading unnecessary data in the owners list view
The issue has been addressed in PR #431 with the following changes:
- Changed Owner entity to use lazy loading for pets collection
- Added OwnerDTO for optimized list view
- Updated OwnerRepository with optimized queries
- Updated OwnerController and view template
These changes will:
- Reduce the number of database queries
- Improve response time
- Lower database load
- Maintain existing functionality
The changes have been tested and verified to work correctly.
Related PR: #431