Unable to retrieve object from dstore after changing value if the id property


#1

For the following data store that only contains one item,

     var Model = require('dmodel/Model');
	 var Memory = require('dstore/Memory');
	 var jsonSchema = require('dmodel/extensions/jsonSchema');
	 var declare = require('dojo/_base/declare');
	 
	 var formStore = (declare([Memory]))({
            Model: jsonSchema(formSchema),
            idProperty: "formId",

     });
	 
	 var formProperties = {
            "formName": "formName",
            "formId": 'xyz',
            "formType": 'formType'
      };
		
	  formStore.setData([formProperties]);

I want to do the following

var item = formStore.getSync('xyz');

//get a property object from an data object,
var property = item.property('formId'); 

//request a change in the value of this property
property.put('abc');

formStore.getIdentity(formStore.data[0]) //returns 'abc'

BUT

formStore.getSync('abc')  //returns undefined, even though it shows as 'abc' in the data array.  

Even though the value of the property changed, I am unable to retrieve it any more by the new Id.


#2

Have you tried using putSync instead of put, to make sure the put operation happens. Also have you verified that the put is actually changing the property, and not the entire object?