-
-
Notifications
You must be signed in to change notification settings - Fork 202
Fix: Resolve Mapped KeyProperty Conflict in Turbo Mode via Store.getKey() #9067
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workingcoreCore framework functionalityCore framework functionality
Description
Resolve keyProperty access conflicts when using Mapped Fields in Turbo Mode (autoInitRecords: false).
The Problem:
- Turbo Mode: Store holds raw objects.
keyPropertypoints to the raw data key (e.g.'l').rawItem['l']works. - Lazy Instantiation: When accessed, raw objects become Records.
RecordFactorycreates getters for canonical field names (e.g.login), but NOT for mapped source keys.record['l']isundefined. - Selection Model: Uses
record[store.getKeyProperty()]. IfkeyPropertyis'l', this fails on instantiated records.
The Fix:
Neo.data.Store#getKey(item): Implement a helper method to resolve the key regardless of item type.- Try
item[keyProp]. - If undefined & item is Record, try
item.get(keyProp).
- Try
- Refactor Selection Models: Update
RowModel(and others) to usestore.getKey(record)instead of direct access.
Goal: Transparently support mapped key properties in mixed Raw/Record environments.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcoreCore framework functionalityCore framework functionality