Gon Zifroni
Gon Zifroni

Reputation: 213

Parse relation query

After successfully adding an object to a Parse.Relation using

1 this.topic.relation("friend").add(email);
2 this.topic.save();

I'm getting Parse.Object._getSubclass requires a string argument on line 1 below

1 renderAllFriends: function(collection, filter) {
2   this.topic.relation("friend").query().find({
3     success:function(emails) {
4       this.$("#friends-list").html("");
5       emails.each(this.renderOneFriend);
6     }
7   });
8 }

Everything seems properly recorded in Mongo. One thing to note is that the Email object is a custom class with a non-mandatory user column.

Thanks for any tips on where to dig for an answer! The Parse repo was not that helpful in this regard since _getSubclass makes no exception for Parse.Relation (which is good).

Gon

Upvotes: 0

Views: 1897

Answers (1)

bjornick
bjornick

Reputation: 56

There were some bugs in the early version of the parse js sdk, where the queries weren't constructed right. If you grab the latest version of the SDK which is 1.0.10, it should work.

Upvotes: 1

Related Questions