macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

relationshipsWithDestinationEntity:

レシーバーと他のエンティティ(entity)とのリレーションシップを返します
-(NSArray *)relationshipsWithDestinationEntity:(NSEntityDescription *)entity:

解説

レシーバーと他のエンティティ(entity)とのリレーションシップを返します。

返り値

( NSArray * )

なし

引数

( NSEntityDescription * )entity

クラス

NSEntityDescription

Instance Methods

使用可能

10.4

参照

例文

// エンティティ
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Entity"
           inManagedObjectContext:[self managedObjectContext]];
		   
NSEntityDescription *otherEntity = [NSEntityDescription entityForName:@"OtherEntity"
           inManagedObjectContext:[self managedObjectContext]];


NSLog(@"otherEntity %@",[[entity relationshipsWithDestinationEntity: otherEntity ] description]);