- Shipped
- August 7, 2026 at 6:10 AM UTC
- Author
- Kamo
- Commit
- ed89305
TeamMember gains an optional self-reference for who it reports to. columnDefinition is pinned to INT8 so Hibernate cannot copy Member.ID's DEFAULT unique_rowid() onto the join column and backfill every row with a manager who does not exist. TeamMemberRepo gains searchDirectory: one page of the org's directory, filtered, ordered and windowed in the database. It is written for orgs with five figures of staff, so the caller never holds more than a page — the picker it backs runs on every keystroke. Terms are ANDed against one concatenated haystack, which is what lets "ana lending" find the Ana in Lending; a chain of ORed LIKEs cannot, because LIKE only matches contiguous text. Every association is joined with an explicit LEFT: an implicit path join is INNER in JPQL and would silently drop everyone without a department. Cycles cannot be expressed in the schema, so findManagerIdOf lets the writer walk a reporting chain one link at a time before accepting a manager.