Skip to content

Instantly share code, notes, and snippets.

@MikailCliftov
Created July 25, 2011 16:45
Show Gist options
  • Save MikailCliftov/1104549 to your computer and use it in GitHub Desktop.
Save MikailCliftov/1104549 to your computer and use it in GitHub Desktop.
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')]);
var applications = Rapid.store.find(q);
The RecordArray of applications is always set to what the initial query object would return.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment