I'm trying to write a simple CRUD functionality in Jaydata, I had written this simple code for update operation:
SampleClass.prototype.Load = function(input1,callback)
{
var param='it.Name=="'+input1+'"';
this.data.items.filter(param).forEach(function(ii)
{
callback(ii);
});
this.data.items.saveChanges();
};
so when I call:
t.Load('Entry4',function(res){console.log(res.Name)})
It works like a charm! But If I call an update operation for callback like:
t.Load('Entry4',function(res){res.Name="Entry5"})
It doesn't change anything in the DB. I have seen something like beginTransaction function as in http://jaydata.org/examples/JayDataPro/ToDoList_complex, but I couldn't understand the essence of it.