My OData model contains a pair of entities with many-to-many relationship (Parents-Children). I am trying to add a child entity to a parent's Children navigation property, but calling saveChanges() afterwards has no effect at all. The code looks something like:
// both 'parent' and 'child' are attached to the context
// both have their navigation properties empty
parent.Children.push(child);
context.saveChanges();
I have also tried:
parent.Children = parent.Children.concat([child]);
parent.Children = [child];
But to no avail, it still doesn't work - the saveChanges() call doesn't make any requests to the service, as if there is nothing to update.
I'd really appreciate an example of how to work with many-to-many relations using JayData, and some help dealing with the issue described above. Thanks