PDA

View Full Version : [CLOSED] create store from array doesn't set ID field



mdissel
4 Jan 2010, 1:39 AM
In the Ext.StoreMgr.Lookup function a new ArrayStore is initialized if the data is an array. But the ID field is not initialized, resulting in autocreated ID's

Thanks
Marco

Condor
4 Jan 2010, 3:43 AM
This is by design. If StoreMgr were to use idIndex:0 then the values in field1 would always need to be unique.

If you want to specify an idIndex then you will need to create an ArrayStore instead of simply specifying an array.

mdissel
4 Jan 2010, 5:04 AM
Is there a workaround to assume the first field is the id field?

Condor
4 Jan 2010, 5:12 AM
As I said, you will explicitly need to configure an ArrayStore.