• 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: What would cause persistentStoreForURL: to return nil?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What would cause persistentStoreForURL: to return nil?


  • Subject: Re: What would cause persistentStoreForURL: to return nil?
  • From: Gideon King <email@hidden>
  • Date: Sat, 13 Mar 2010 02:48:08 +1000

Ah, I think I had a fundamental misunderstanding - I thought it would load the store, but it only returns it if it's already loaded in the coordinator.

The documentation gives no clue of this - all it says is:
Parameters
URL
An URL object that specifies the location of a persistent store.

Return Value
The persistent store at the location specified by URL.


I think it would be very easy to assume (as I did) that it would load it from the URL provided.

Anyway, I have it working now, only it shows that I still get the same over-releasing of the managed object context when I try to migrate it to an xml store, as what I get when I try to do a "save as". I'm not sure exactly what that tells me though - probably that it's a problem somewhere in my managed objects. I'll go back again and have yet another look at every place I refer to the managed object context, and see if I can track it down. <rant (3am style :-)>If I had had any inkling of the problems and development overheads we would have with core data when I started this, I would never have used it - I hope it does pay off in the future to make development and maintenance easier, but for the moment, it's been a massive and unexpected investment.</rant>

Thanks for your help Mike.

Regards

Gideon

On 13/03/2010, at 2:09 AM, Mike Abdullah wrote:

> What if you print out [psc persistentStores] ?
>
> I think you'll find the PSC is surprisingly fussy about the URLs. e.g. capitalisation seems to matter. So do trailing slashes. Oh, and also the difference between:
>
> file:///foo.bar
> file://localhost/foo.bar
>

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: What would cause persistentStoreForURL: to return nil?
      • From: Mike Abdullah <email@hidden>
References: 
 >What would cause persistentStoreForURL: to return nil? (From: Gideon King <email@hidden>)
 >Re: What would cause persistentStoreForURL: to return nil? (From: Mike Abdullah <email@hidden>)

  • Prev by Date: Re: performSelector doesn't work for modal window
  • Next by Date: RE: IKFilterUIView - Problem with text fields
  • Previous by thread: Re: What would cause persistentStoreForURL: to return nil?
  • Next by thread: Re: What would cause persistentStoreForURL: to return nil?
  • Index(es):
    • Date
    • Thread