Core Data and the theory or best practice of passing data between views

I am playing around with the ipad split view with core data.

In my RootView I get a list of titles for records using core data.  If the user chooses something in the RootView I want to display this full record in the DetailView.

My question is what is the best way to do this?

My experience with databases and other languages would be to pass the records ID to the detailViewController.detailItem and then the DetailViewController can get the whole record.

But something tells me or I have the feeling that it should be easier with core data and that maybe I should be passing a NSManagedObject or something like this.

Could you please assist.
LVL 20
darbid73Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

robertcernyCommented:
NSManagedObject lives usually in AppDelegate. Basic idea of using CoreData is "don't think about implementation" so I would recommend you tp pass only data into detail controller which you need. If it's a whole object (DB record) or its part is up to your implementation
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
darbid73Author Commented:
Ok I understand your first sentence but then IF i understand you correct you are sitting on the fence.  Basically you are saying do it how I like.  So for me the easiest seem to be to pass just a primary key to the detail view and then get the whole record as that view is loading.
0
darbid73Author Commented:
Thanks - would have liked to hear more and understand our dicussion.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
iOS

From novice to tech pro — start learning today.