Frontmatter
| id | 9069 |
| title | Refactor: Collection.Base to use getKey() hook for Turbo Mode Support |
| state | Closed |
| labels | bugcore |
| assignees | tobiu |
| createdAt | Feb 9, 2026, 3:48 AM |
| updatedAt | Feb 9, 2026, 3:55 AM |
| githubUrl | https://github.com/neomjs/neo/issues/9069 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Feb 9, 2026, 3:55 AM |
Refactor: Collection.Base to use getKey() hook for Turbo Mode Support
tobiu assigned to @tobiu on Feb 9, 2026, 3:48 AM
tobiu changed title from Fix: Grid IDs Regression & Store.getKey Reverse Mapping Support to Refactor: Collection.Base to use getKey() hook for Turbo Mode Support on Feb 9, 2026, 3:50 AM

tobiu
Feb 9, 2026, 3:55 AM
Input from Gemini 3 Pro:
✦ I have resolved the regression where the Grid was displaying negative IDs (
-1,-2).Analysis:
- Root Cause:
Neo.collection.Baseaccesseditem[this.keyProperty]directly. In "Turbo Mode" (Store),keyPropertyis'login', but the raw item only has'l'. Direct access returnedundefined, causing the Collection to generate new negative IDs.- Solution: Refactored
Neo.collection.Baseto use agetKey(item)method (defaulting to direct access). This allowsNeo.data.Store(which overridesgetKey) to inject its smart "Reverse Mapping" logic (added in #9067).Changes:
- Refactored
src/collection/Base.mjs: Replaced directkeyPropertyaccess withgetKey(item).- App Config:
Contributors.mjsremainskeyProperty: 'login'(canonical), ensuring architectural correctness.Result: The Grid now correctly identifies records using the mapped key (
l->login), displaying positive IDs and allowing correct selection behavior.
tobiu closed this issue on Feb 9, 2026, 3:55 AM
Problem: accesses directly. In Turbo Mode (Store), we use mapped keys (e.g. but raw data has ). Direct access returns , causing the Collection to generate negative IDs (, ) for items.
Solution:
Result: The Collection will correctly resolve keys from Raw Objects even when using Canonical Key Properties, fixing the Grid ID regression without breaking Selection Models.