I searched the group beforehand, found
https://groups.google.com/forum/?fromgroups#!topic/persistencejs/wE4h...
but I'm not using the persistencejs jQuery plugins (but I am using jQuery
elsewhere)
My model definition is as follows:
> var Track = persistence.define('Track', {
> title: "TEXT",
> created: "TEXT",
> updated: "TEXT"
> });
> var Position = persistence.define('Position', {
> timestamp: "DATE",
> latitude: "INT",
> longitude: "INT",
> altitude: "INT",
> accuracy: "INT",
> heading: "INT",
> speed: "INT"
> });
> Track.hasMany('positions', Position, 'track');
The runtime is basically
> var testTrack = new Track({
> title 'Test'
> });
> var cPosition = new Position({
> timestamp: new Date(),
> latitude: 1,
> longitude: 1,
> accuracy: 1,
> heading: null,
> speed: null
> });
> testTrack.add(cPosition );
But I get the error *Uncaught TypeError: Object #<Observable> has no method
'add'
*Id really appreciate any help to let me know what I'm doing wrong or if I
missed anything - thank you.