javascript - Sencha Touch - HasOne Setter doesn't seem to work -


I have something on the lines of this:

  Events: [{id: 1, Name: 'Birthday Party', Organizer: {ID: 1, Name: 'Jill'}, Attendees: [{id: 2, name: 'Bob'}, {id: 3, Name: 'Jill'} ]}   

As always: the name of the events, there are attendees in it, but I also see an organizer.

So I've setup my Hasone Proxy inside the event for HasOne Organizer and I'm trying to create an Organizer object and attach to the event within the console, but there is no luck.

I tried to do something like this, as the documentation says a setter is made ... although only give an example to set an id (which also does not work).

  var event = Ext.create ('App.model.Event', {ID: 1, name: 'birthday party'}); Event.getOrganiser (); // is called undefined event.setOrganiser ({id: 1, name: 'jill'}); // TypeError says: object # & lt; Object & gt; No way 'get' event.setOrganiser (1); // as an example, but it still says TypeError message event.setOrganiser (Ext.create ('App.model.Organiser', {id: 1, name: 'jill'}); // type type: error # Object # & lt; object & gt; there is no way 'get'   

That's why I am confused ... The examples of doctors do not work for me but I do not have all the data Anyway, do not know how without access to a full day source code without access to it without spending dumping and breakbillings .

Any thoughts? Should I be able to do any of the above or do it mean to work like this? I want to post both event and organizer object with a call ... When this happens, it appears to me when I event.save ();

  {id: 1, Name: 'Birthday Party', Organizer: {ID: 1, Name: 'Jill '}}   

Sorry, if you are looking at it on ST platform but it seems that Ghost Town

Thanks for the help :)

Updates in ST 2.0.1 and this is what worked:

  event.setOrganiser (Ext.create ('App.model.Organiser', {id: 1, name: 'jill'});    

Comments