• 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: CoreData fetched property: one-to-one-to-many relationship
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreData fetched property: one-to-one-to-many relationship


  • Subject: Re: CoreData fetched property: one-to-one-to-many relationship
  • From: James Gregurich <email@hidden>
  • Date: Sun, 03 Aug 2008 15:19:35 -0700


thanks for the response. Adding the property is straight forward. The key parts that are not clear to me are:


1) how exactly do you set up a predicate to walk an extra entity to get to the target entity.

2) how do you specify the destination entity. pass it to [NSFetchRequest setEntity:] and pass that fetch request to [NSFetchedPropertyDescription setFetchRequest:]? I would assume in my example that my destination entity is the story.



-James Gregurich
Engineering Manager
Markzware


On Aug 3, 2008, at 10:37 AM, Omar Qazi wrote:

Create an NSFetechedPropertyDescription by setting up a fetch request in code, then add the property using the setProperties method of NSEntityDescription. It is only possible to edit an NSEntityDescription if you are not associated with a persistent store coordinator, so be careful. You might want to just add a custom method to the class of your Core Data model to execute the fetch request and get the job done.

Omar Qazi
Hello, Galaxy!
1.310.294.1593

On Aug 3, 2008, at 9:49 AM, James Gregurich wrote:

greetings!


I'm trying to figure out how to dynamically (in code) set up a fetched property with a Coredata in-memory store. The documentation is not detailed enough for me to quite see what the correct way to set the code up is and I'm not finding much in the way of useful sample code when searching on NSFetchedPropertyDescription.


What is the correct way to programmatically add a fetched property to the box to get the list of stories for a given box managed object?



thanks,
James Gregurich
Engineering Manager
Markzware


_______________________________________________

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: CoreData fetched property: one-to-one-to-many relationship
      • From: Negm-Awad Amin <email@hidden>
References: 
 >CoreData fetched property: one-to-one-to-many relationship (From: James Gregurich <email@hidden>)
 >Re: CoreData fetched property: one-to-one-to-many relationship (From: Omar Qazi <email@hidden>)

  • Prev by Date: Re: How to get the value of a NSNumber contained in an array while debugging ?
  • Next by Date: Re: How to get the value of a NSNumber contained in an array while debugging ?
  • Previous by thread: Re: CoreData fetched property: one-to-one-to-many relationship
  • Next by thread: Re: CoreData fetched property: one-to-one-to-many relationship
  • Index(es):
    • Date
    • Thread