• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Core Data Refreshing / Saving Issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data Refreshing / Saving Issues


  • Subject: Re: Core Data Refreshing / Saving Issues
  • From: Miguel Sanchez <email@hidden>
  • Date: Fri, 22 Sep 2006 13:51:19 -0700

it isn't clear what you mean by "they don't work fine" but since you are implementing smart list I assume you mean that your lists aren't refreshed as you expect. Are you also using fetched properties? If this is the case, fetched properties aren't refreshed automatically. From the fetched property docs

"The effect of a fetched property is similar to executing a fetch request yourself and placing the results in a transient attribute, although with the framework managing the details. In particular, a fetched property is not fetched until it is requested, and the results are then cached until the object is turned into a fault. You use -refreshObject:mergeChanges: (NSManagedObjectContext) to manually refresh the properties—this causes the fetch request associated with this property to be executed again when the object fault is next fired.
"


- Miguel

On Sep 21, 2006, at 1:24 AM, Mathieu Tozer wrote:

I'm experiencing some strange behavior and I was wondering if anyone can help me out.
I have smart list objects which are core data entities, and they work fine when they are freshly inserted into the application / persistent store. However if I quit my app, restart, and try to use them, they don't work in the same way, even when the stack looks the same, and the code all does the same thing! What's more, when I quit, and restart again, the smart group works and fetched the right objects, but again it doesn't dynamically update itself. It only ever works when all the objects are new and haven't been saved to persistent store before. I did a po self in the debugger on a 'fresh' working smart group and one of the 'broken' ones and this is what I got:
See here for an annotated image...
http://www.mathieutozer.com/CoreDataIssues-060921-181438.jpg


Or as plain text:

WORKING
<SmartGroupMO: 0x3eaf130> (entity: SmartGroup; id: 0x3eaf180 <x- coredata:///SmartGroup/t75FE6504-3C61-4C85-B47E-CC81FC6C4C36> ; data: {
extraPredicateString = nil;
isLibrary = 1;
language = 0x3ead6b0 <x-coredata:///Language/t0F9DE5AE- EBEB-44DA-955E-0BD16BD46AFC>;
name = Library;
predicateData = <62706c69 73743030 d4010203 04050607 0a592461 72636869 76657258 24766572 73696f6e 5424746f 7058246f 626a6563 7473>;
})


BROKEN
<SmartGroupMO: 0x3e32da0> (entity: SmartGroup; id: 0x3e32cf0 <x- coredata://F207F621-31E8-4281-997A-9C596F01F68A/SmartGroup/p11> ; data: {
extraPredicateString = nil;
isLibrary = 1;
language = 0x3e3df20 <x-coredata:// F207F621-31E8-4281-997A-9C596F01F68A/Language/p2>;
name = Library;
predicateData = <62706c69 73743030 d4010203 04050607 0a592461 72636869 76657258 24766572 73696f6e 5424746f 7058246f 626a6563 7473>;
})


I noticed that there was some differences in the x-coredata fields.

Anyone able so shed any light??

-Mathieu Tozer
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Core Data Refreshing / Saving Issues (From: Mathieu Tozer <email@hidden>)

  • Prev by Date: Re: SQL Development
  • Next by Date: Re: CFZombieLevel
  • Previous by thread: Core Data Refreshing / Saving Issues
  • Next by thread: Where the data gets stored ?
  • Index(es):
    • Date
    • Thread