Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

zyzz12

macrumors newbie
Original poster
Hi Everyone, Been learning to use core data, all was going well until I reached the One to Many relationship point. Can't seem to find any good simple tutorial that implements a One to Many Relationship, If Anyone knows of one, then that would be great.

I am experimenting with a simple core data example.


Entity A = carMake: makeName = String.

Entity B = carModel: modelName = String.

Relationship: One to Many, One carMake has many carModels.

I have 4 View controllers:
-MakeVC
-AddMakeVC
-ModelVC
-AddModelVC

I have managed to code the first two view controllers that deal with listing carMake and adding carMake, My problem occurs with the ModelVC and AddModelVC.

As i do not know how i should be passing the selected carMake and as what type.

Q. How to pass selected carMake to ModelVC.

Q. How add a carMake to a carModel.

Q. How to fetch and list only the carModels for the carMake selected.

Thank you for any help, Again is any one knows of a good tutorial i can follow then that is all thats really required.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.