uitableview - How do I access the attribute of a one to many relationship and pass to another tableview? -


so have 2 entities in coredata (a , b). has many bs , b can belong 1 a. have managed display on tableview , when tap cell, should segue tableview controller displays list of bs. using nsfetchedresultscontroller monitor tableview. in didselectrowatindexpath method, have:

- (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath { self.tappedindex = indexpath; nslog(@"index tapped %@",self.tappedindex); nslog(@"%@",[self.fetchedmanagedresultscontroller objectatindexpath:self.tappedindex]   ); 

}

the output nslog is:

<b: 0x1700b1a00> (entity: b; id: 0xd000000000500000 <x-coredata://5a01cf10-0e90-496f-9b84-faf68346d6dc/customer/p20> ; data: { items = "<relationship fault: 0x174221ee0 'items'>"; name = "connie  brittani  "; phone = 8034233759; 

})

my question how pass items second tableview. appreciated!

so read more on faults , learned it's not error more of unrealized object. become real object when it's called. in case, had one-to-many relationship entity b nsset in a.h file. had create nsmutableset , initialize code above.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -