• 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: Need help with fetch request
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data: Need help with fetch request


  • Subject: Re: Core Data: Need help with fetch request
  • From: Diederik Hoogenboom <email@hidden>
  • Date: Sun, 15 Oct 2006 14:02:12 +0200

Jakob,


When I designed the model I though I would never have to go the other way (in the example from Wheels to Cars). I can add the relationship and then it would probably work. Unfortunately, I now have to convert the whole persistent store from the old model to the new model just for one relationship! If I add the relationship the old store will complain that the field is unkown (eventough it's set to 'optional'. Oh well, that's what you get from not following the rules ;-).



Diederik



On 14-okt-2006, at 17:17, Jakob Olesen wrote:


On 10/10/2006, at 21.27, Diederik Hoogenboom wrote:

I want to fetch some objects based on a condition existing in one of its relationships.

Example Object Model:

Car -> Wheel

A car can have one or more wheels. And a wheel has a property called color (to keep it simple an NSString). The relationship is called wheels. There is no inverse relationship.

What is your really, really good reason for not having an inverse relationship?
Is it one-to-many or many-to-many?


Unfortunately the fetch request does result in any objects retrieved.
I am using an SQL-lite store for this example.

What does the generated SQL look like? Does it change if you add an inverse relationship?



_______________________________________________ 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
  • Follow-Ups:
    • Re: Core Data: Need help with fetch request
      • From: Jakob Olesen <email@hidden>
References: 
 >Core Data: Need help with fetch request (From: Diederik Hoogenboom <email@hidden>)
 >Re: Core Data: Need help with fetch request (From: Jakob Olesen <email@hidden>)

  • Prev by Date: Re: Fonts question
  • Next by Date: Re: Core Data: Need help with fetch request
  • Previous by thread: Re: Core Data: Need help with fetch request
  • Next by thread: Re: Core Data: Need help with fetch request
  • Index(es):
    • Date
    • Thread