Hi all - I need some help with core data fetching...

I have 1:N relationship between Project and Measurement entities. I add all objects to managed context programatically using + [NSEntityDescription insertNewObjectForEntityForName:inManagedObjectContext]. First I add Project object, then I add all child Measuerements as needed. After the objects are added or updated, I save the data to XML files (the two object types are saved to different persistent stores).

This works fine, the files save and load correctly. When I later want to fetch the measurements in my custom NSTableView data cell to draw the statistics, no measurement is fetched (I get empty array).

If I use the same code for fetching immediately after adding the objects to the context, the fetching works... It looks like the problem might be related to fact that I use different persistent store for Project than for Measurement - if I fetch other objects saved in the same persistent store, fetch works.

Any ideas? Cheers, Tom


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to