jaydata not working in related data storage

231 views Asked by At

I am new to jaydata and just learned through many tutorials and examples how to define model and store data using JayData. I have written a code which would store data on local storage and it has two entities with one to many relation with each other. I have checked my code many times and also compared it with the available example codes and it is right code but it is not working. the problem is that when I push the single entity into the array which is defined in the other entity model, it does not save the changes and if I comment that push line, everything works fine. I have created a jsfiddle and I have commented that line in my js code.

The code is like this:

var task_entity = new Tsk({Task_work:tsk });
mydb.tasks.add(task_entity);

var category_entity=new Categry({Name:ctgry});
category_entity.taskk=new Array();         
//category_entity.taskk.push(task_entity);  // this line is not working

mydb.categorys.add(category_entity);

I have commented the line that is creating problem

Here is the jsfiddle http://jsfiddle.net/zGqyZ/1/

Please let me know what is wrong with the code or may be with the jaydata model, I can't find the main problem.

1

There are 1 answers

1
Gabor Dolla On BEST ANSWER

Only websql/sqlite supports navigation at this moment, this will change really soon