Skip to content

Instantly share code, notes, and snippets.

MyApp.aSimpleController= SC.ObjectController.create({
contentBinding : SC.Binding.single('MyApp.anArrayController.selection')
});
MyApp.anotherArrayController= SC.ArrayController.create({
abcBinding: 'MyApp.aSimpleController.content',
xyzBinding: SC.Binding.oneWay('MyApp.anotherObjectController.content'),
observeMe: function(){
var abc= this.get('abc');
var xyz= this.get('xyz');
Creating the record:
var record = Rapid.store.createRecord(Rapid.Check, {
guid: '@123'
});
relationA.get('checks').pushObject(record);
... set up an observer on record status
Rapid.store.commitRecords();
the record is created, but relationA.checks points to @123 instead of the storeKey's id (1000)
I'm trying to reuse a query object:
var q = this._q;
if (!q){
q = this._q = SC.Query.create({
recordType: Rapid.Application
});
}
q.set('conditions', 'currentStep = %@');
q.set('parameters', [this.get('content')]);