CakePHP associates all fields with the same “index” as a single “record” in your database. The "index" (i.e. 0 in Foo.0.id ) has nothing to do with the "id" of the entry, it's just a number.
For instance:
Foo.0.id = 123 Foo.0.name = 'hello'; Foo.1.id = 124 Foo.1.name = 'world';
As mentioned at the beginning of my answer, the index itself does not matter, this code will do the same:
Foo.12345.id = 123 Foo.12345.name = 'hello'; Foo.54321.id = 124 Foo.54321.name = 'world';
As long as the fields of the same record have the same “index”, CakePHP will understand that they belong “together”.
When sending this data and storing it with;
$this->Foo->saveMany($this->data['Foo']);
CakePHP updates two lines using the Foo model;
table 'foos';
id name ------------------------ 123 hello 124 world
Your code seems to use the same identifier ( $qset['Qset']['id'] ) for each line, which is probably not the correct ID to update these entries
source share