PDA

View Full Version : [OPEN] [2.0b1][CLOSED] Wrong generated this.id with ds.reload()



Smash_hit
29 Oct 2007, 5:15 PM
I used ds.reload() method in an editor-grid application, before reloading , everything works correctly with this.id in record. But after dataStore reloading, a bug comes up.
Before reloading, I added a new record, it shows me this.id:1011
(I have ten records in grid started with 1001)
After reload of dataStore, I did the same operation (add another new record), this time, the this.id becomes 1023. Obviously, the reloaded dataStore with original dataset(10 records) started with inner id 1012.

The correct this.id of second added record should be 1012, rather than 1023.

I hope Ext develop team could fix this bug in final-released Ext 2.0.

tryanDLS
29 Oct 2007, 5:33 PM
If you are autogenerating the ids they are numbered
1001-1011 for your first load
1012 for the added record
1013-1022 for the records you reloaded
1023 for the added record

This is the correct behavior. Record.Id is just an auto-incremented counter. It has not knowledge of whether you called store load or reload.

Smash_hit
30 Oct 2007, 12:27 AM
Thank you for your kindly explanation! Now I know what I should do with it!