开发者

CoreData with Relationship and attributes in relation

I can't figure it out. How does CoreData implement JOIN known from SQL?

Let's say I have EntityA (attr1, attr2) and EntityB(attr3, attr4). Now I want to set up relationship on EntityA.attr1 = Entity开发者_如何学运维B.attr3

I don't see a place to define which attributes should be used with relation.

Regards.


the relationships are defined in the xcdatamodel page.

The relationship objects are returned in an NSSet which you can then manipulate using an NSarray.

NSSet *set = [object valueForKey:@"relationship"]; 
NSArray *relationships = [set allObjects];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜