0
我有一个简单的嵌套查询,但我无法弄清楚如何将“this”变量绑定到成功块。我包含一些额外的代码行,以提供更多的上下文。parse.com将此绑定到成功块
initialize: function() {
_.bindAll(this, 'addAll', 'addOne', 'logOut', 'newJob', 'showDetail');
this.$el.html(_.template($("#manage-jobs-template").html()));
this.jobs = new JobList;
this.requests = new RequestList;
this.jobs.query = new Parse.Query(Job);
this.jobs.query.equalTo('jobPostedBy', Parse.User.current());
this.jobs.fetch({
success: function (jobs) {
//This is undefined here.
this.requests.query = new Parse.Query(Request);
this.requests.query.containsAll("job", jobs);
this.requests.fetch();
}
});
这正是我在寻找!! +1两种解决方案。现在关闭调查为什么containsAll不工作:)).... – Mika