6 Commits

Author SHA1 Message Date
shahondin1624 19adf0ba87 chore: move issue-204 plan to done 2026-04-30 08:13:11 +02:00
shahondin1624 0ffc993d3f chore: move issue-203 plan to done
Database Portability Tests / Unit Tests (PlatformHelper) (pull_request) Failing after 37s
Database Portability Tests / Integration (mysql) (pull_request) Has been skipped
Database Portability Tests / Integration (postgres) (pull_request) Has been skipped
Database Portability Tests / Integration (sqlite) (pull_request) Has been skipped
Database Portability Tests / Verify no MySQL-specific SQL (pull_request) Successful in 5s
2026-04-29 22:09:20 +02:00
shahondin1624 e1d24d4d54 fix(MemberService): wrap multi-step writes in database transactions
Add IDBConnection dependency to MemberService and wrap create(),
update(), and softDelete() in transactions (beginTransaction/commit/
rollback). This ensures atomicity when inserting/updating members
alongside sub-entities (addresses, phones, emails) — a failure at
any step now rolls back the entire operation instead of leaving
orphaned records.

(Closes #203)
2026-04-29 22:08:38 +02:00
shahondin1624 d4e25fe739 Fix countArchived() loading all members into memory (Closes #201)
Database Portability Tests / Unit Tests (PlatformHelper) (pull_request) Failing after 38s
Database Portability Tests / Integration (mysql) (pull_request) Has been skipped
Database Portability Tests / Integration (postgres) (pull_request) Has been skipped
Database Portability Tests / Integration (sqlite) (pull_request) Has been skipped
Database Portability Tests / Verify no MySQL-specific SQL (pull_request) Successful in 5s
Replace in-memory filtering with a SQL COUNT(*) query in the mapper,
matching the pattern of the existing countAll() method.
2026-04-29 19:13:52 +02:00
shahondin1624 ee569250ad 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
- 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/
2026-04-28 21:35:42 +02:00
shahondin1624 b29a268b1d Restructure .plans/ into done/ and open/ subdirectories
- Move completed plan files to .plans/done/
- Move 18 open plan files to .plans/open/
- Update .gitignore to exclude .verified_plans temp file
- Verified all 18 open plans still describe unimplemented issues
2026-04-28 20:30:55 +02:00