Fix N+1 query problem in MemberService (Closes #200)
Database Portability Tests / Unit Tests (PlatformHelper) (push) Failing after 40s
Database Portability Tests / Integration (mysql) (push) Has been skipped
Database Portability Tests / Integration (postgres) (push) Has been skipped
Database Portability Tests / Integration (sqlite) (push) Has been skipped
Database Portability Tests / Verify no MySQL-specific SQL (push) Successful in 5s
Database Portability Tests / Unit Tests (PlatformHelper) (push) Failing after 40s
Database Portability Tests / Integration (mysql) (push) Has been skipped
Database Portability Tests / Integration (postgres) (push) Has been skipped
Database Portability Tests / Integration (sqlite) (push) Has been skipped
Database Portability Tests / Verify no MySQL-specific SQL (push) Successful in 5s
- MemberMapper: 8 new *WithRelations() methods that fetch members with addresses, phones, and emails in a single query using LEFT JOINs - MemberMapper: addJoinClauses() and fetchWithRelations() private helpers that handle JOIN duplication (one member × multiple sub-entities) - MemberService: refactored findAll, findByFamily, findByStatus, search, findByBirthdayThisMonth, findWithUnpaidFees, findFiltered, fullTextSearch to delegate to joined mapper methods - MemberService: added arrayToMember() and arrayToAddress() helpers so buildMatchContext() works with flat-array results from fullTextSearch - MemberServiceTest: updated all existing tests to mock new method names and return flat-array format with nested sub-entities - MemberServiceTest: added 10 new tests covering joined methods, backward compatibility, and correct shape of returned data - Moved issue-200 plan from open/ to done/
This commit is contained in:
Reference in New Issue
Block a user