We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I've got two ParseModel subclasses: Foo and Bar. Foo holds an instance of Bar like so:
ParseModel
Foo
Bar
@interface Foo : ParseModel @property(nonatomic, strong) Bar *bar; @end @interface Bar : ParseModel @property(nonatomic, strong) NSNumber *theAnswer; @end
I fetch all Foos. I want to assert some properties about bars
PFQuery *query = [PFQuery queryWithClassName:@"Foo"]; query.cachePolicy = kPFCachePolicyCacheThenNetwork; [query includeKey:@"bar"]; [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) { // Print information about foos. Foo *foo = objects[0]; expect(foo.bar).to.beInstanceOf([Bar class]); // FAILS: expected Bar but was actually PFObject expect(foo.bar.theAnswer).to.equal(@42); // -[PFObject theAnswer]: unrecognized selector sent to instance... }];
What's the expected behaviour here? Must I marshall PFObjects in and out of those properties myself?
PFObjects
The text was updated successfully, but these errors were encountered:
Oh, I didn't know you had to call +registerParseModel on every ParseModel class! Perhaps the README could have a section on this.
+registerParseModel
Sorry, something went wrong.
Okay... this is tré strange. +registerParseModel did make my test succeed yesterday, but now it doesn't work...
No branches or pull requests
I've got two
ParseModel
subclasses:Foo
andBar
.Foo
holds an instance ofBar
like so:I fetch all
Foo
s. I want to assert some properties about barsWhat's the expected behaviour here? Must I marshall
PFObjects
in and out of those properties myself?The text was updated successfully, but these errors were encountered: