A search row: the ledger account plus its resolved customer and entity.
Both surfaces project exactly this shape, which is what lets them share
one cache namespace and one cached value type. They already ran the identical
join structure (customer inner, identity / organization left) — the union is
just the columns each one previously discarded:
the consumer search gains customerId / customerName,
the admin search gains rawName / entityCountry.
rawName is the stored name column before the null-fallback placeholder
mapLedgerAccountFromDb substitutes (Account • • • • 1234) — it is not a
redaction, so carrying it on both surfaces discloses nothing new. The admin
surface already saw the same value through name whenever it was non-null.
Type Declaration
customerId: Customer["id"]
customerName: string
customerOrganizationId: string
entityCountry: string
entityDisplayName: string
entityId: Entity["id"]
entityReferenceId: string|null
entityType: Entity["type"]
rawName: string|null
The stored account name before the display fallback — null when unnamed.
A
searchrow: the ledger account plus its resolved customer and entity.Both surfaces project exactly this shape, which is what lets them share one cache namespace and one cached value type. They already ran the identical join structure (customer inner, identity / organization left) — the union is just the columns each one previously discarded:
customerId/customerName,rawName/entityCountry.rawNameis the storednamecolumn before the null-fallback placeholdermapLedgerAccountFromDbsubstitutes (Account • • • • 1234) — it is not a redaction, so carrying it on both surfaces discloses nothing new. The admin surface already saw the same value throughnamewhenever it was non-null.