Now the third record does have an id (set automatically to the server's pk). Somehow it is treated differently from the other records. It doesn't seem to affect it in any way except that its selection/deselection in a grid based on that store doesn't work well.

Basically once selected, I can select another record but the third one will not visually be deselecedt unless I Ctrl-click it.

If I destroy the grid and recreate it then the problem will go away and the output in firebug becomes the expected:

Also, doing the following does not return anything for a newly created record even though the key has been set and can be accessed with the id property of the record (all other records are returned just fine):