The id field is set when the record is written to the DB. If you want to make sure the proper value is read after sync() then you need to listen the write event of the store.