• 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
NSFetchedResultsController from a certain object of a to-many relationship of an entity?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSFetchedResultsController from a certain object of a to-many relationship of an entity?


  • Subject: NSFetchedResultsController from a certain object of a to-many relationship of an entity?
  • From: Ignacio Enriquez <email@hidden>
  • Date: Sun, 8 Aug 2010 19:10:25 +0900

Hi,

I have a recursive structure where there are folders and files.
Folders can contain various folders and/or files. (File entity has a
boolean "isDirectory" flag)

Is easy to show the highest (upper) level data in an UITableView but I
am not sure how to implement the UITableView datasource  for next
levels.
(The structure was discussed further here:
http://www.cocoabuilder.com/archive/cocoa/291457-coredata-warning-file-children-to-many-relationship-does-not-have-an-inverse.html)

A simple approach would be to get the objects of the relationship of
the object at a particular cell and pass this objects set to the new
UITableView as its datasource.
But I am not sure this is the best approach, specially when the user
goes deeper in a big structure (ie.:go to
folder>folder>folder>folder>folder>file) is it?
(I fell like it would be loosing some CoreData merits like: batchSize,
maybe sorting, etc.)

I would like to know if there is a way I can get a
NSFetchedResultsController object that fetches results not only from
the highest level of my model.
I want to have a results containing files and/or folders from any File
(which is an entity that has to-many relationship "files") that could
be at any level of my structure.

It this possible?

Thanks in advance.

Ignacio
_______________________________________________

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: NSFetchedResultsController from a certain object of a to-many relationship of an entity?
      • From: Keary Suska <email@hidden>
  • Prev by Date: Re: NSTextView redraw while resigning first responder
  • Next by Date: Re: NSFetchedResultsController from a certain object of a to-many relationship of an entity?
  • Previous by thread: Re: Core Data : Multiprocess (was Multiuser) ?
  • Next by thread: Re: NSFetchedResultsController from a certain object of a to-many relationship of an entity?
  • Index(es):
    • Date
    • Thread