Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Draw This
($0.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 07-17-2009, 09:19 PM   #2 (permalink)
grgcombs
Registered Member
 
Join Date: Jul 2009
Posts: 7
grgcombs is on a distinguished road
Default

In short: Yes. It's possible, if I understand what you're talking about. Is it easy? No F'ing way. I just got done implementing core data and it was a real bitch. Most of the tutorials and examples floating out there don't do much good in explaining WTF is going on ... they just show you how to get it working, not how to get it working for what YOU want to do with it.

I wound up buying the eBook on the iPhone SDK from Pragmatic Bookshelf. It's got a chapter on Core Data. While it didn't go into much detail on relationships, it was a good start.

I've got a many-to-many relationship between two object models. I wound up creating a third object model to act as an intermediary ... it does one-to-many to my main objects, and thus in the end I've got a many-to-many relationship.

The real bitch for me was that I had to build in the Core Data implementation in stages. First I implemented one object model, and got it populated with a property list. Then, I'd start implementing the middle object model (keeping it ignorant of either of the two main models) ... get it populated with dummy data, just to make sure I had it working. Then I created the relationship from it to the first one, which broke my persistent store without telling me why it was failing. Then once I had that relationship working and populating, I went over to the third model and built it up by itself and populating with it's property list. Then I connected it over to the middle object model ... then magically it all works.

Apple's documentation on Core Data is a f*ing joke. I'm serious. Totally worthless.

The most powerful thing out of all of this is the predicates. But they also are the hardest to wrap your head around. No one has much GOOD documentation on how you should use them to get your crap together.




Quote:
Originally Posted by cation007 View Post
Hi,

I am trying to save and retrieve a hierarchy of objects. I know its not easy to do it with sqlite3.


Is it possible to do this with Core Data ? can I save all the objects and retrieve them, modify them save them back to file using core data?

Are they are sample code/ tutorial to do this?

Google didn't help me

Thanks for replying.
grgcombs is offline   Reply With Quote
 

» Advertisements
» Online Users: 566
14 members and 552 guests
djbrooks111, Dump3, equalsabracket, esoteric, HowEver, iekei, ITCreative, lzwasyc, msovani, nt.hai, OneGoodApp, PapaSmurf, Sean Coco, tranvutuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 174,548
Threads: 93,727
Posts: 401,266
Top Poster: BrianSlick (7,954)
Welcome to our newest member, rosalvadx91
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 10:29 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.