简体   繁体   中英

PFObject subclass pointer assignment without prefetching the related PFObject

I'm using PFObject subclassing, say:

@interface CarObject : PFObject <PFSubclassing>
@property (nonatomic, strong) BrandObject *brand;
@end

and

@interface  BrandObject : PFObject <PFSubclassing>
@end

How can I create CarObject with a reference to respective BrandObject without creating or fetching the BrandObject if I know BrandObject.objectId string?

您可以使用objectWithoutDataWithClassName:objectId:创建一个具有指定I的空占位符对象。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM