ios - Core Data Table Relationship and Fetchrequest -
I am developing an iPad application using storyboard and core data. I have no good idea about core data. I have 2 table names, A and B table have 2 fields with 2 data names and value. In Table B, there are two field names with name codes and text. The limit of AA is set.
Table A
Datacode value
p1 10
M1 17
p028 <
M3 20
w4 12
Table B
Item Code
P0 Car
P1 bus
M2 penn
M1 ball
P restriction
R1 book
M3 pencil
N1 TV
w4 radio
Item code in table B is the data code in Table A + some other value.i Based on table code, it is necessary to bring the text value from the table B. The item code, which corresponds to the datacode in the table, How at the door I get text b.
First you need to make a connection between tables A and B. After that you have to get the record based on your relationships ... you will get your records like this ....
NSMutableArray * arrObj = [[NSMutableArray alloc] init]; For (TableBob relationWithTblB in TableB * tblObj) {[arrObj addObject: tblObj]; } NSLog (@ "Record related to your table -% @", AROBJ);
Comments
Post a Comment