• 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: fetch request with compound predicate doesn't sort properly
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fetch request with compound predicate doesn't sort properly


  • Subject: Re: fetch request with compound predicate doesn't sort properly
  • From: Ken Victor <email@hidden>
  • Date: Tue, 14 Mar 2006 16:00:43 -0800

At 3:51 PM -0800 3/14/06, Greg Herlihy wrote:
Is there a reason for making a copy of the NSFetchRequest? And have you tested without making this copy:

NSFetchRequest* request = [objectModel fetchRequestTemplateForName: fn];

the same problem exists whether or not i make the copy. i make the copy because i use the same fetch request with different sort descriptors at various parts of my app. i discovered empiracally that setting the sort descriptors on a request retrieved from the model "stuck" with the request the next time i retreived it from the model. i didn't quite understand why this was so, but figured the easiest solution was simply to use a copy and then "attach" the appropriate sort descriptors as needed.


ken




Greg

On 3/14/06 3:30 PM, "Ken Victor" <email@hidden> wrote:

> NSFetchRequest* request = [[[objectModel
fetchRequestTemplateForName: fn] copy] autorelease];
_______________________________________________
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: fetch request with compound predicate doesn't sort properly
      • From: Greg Herlihy <email@hidden>
References: 
 >Re: fetch request with compound predicate doesn't sort properly (From: Greg Herlihy <email@hidden>)

  • Prev by Date: Re: fetch request with compound predicate doesn't sort properly
  • Next by Date: Undo accidentally broken in Core Data app
  • Previous by thread: Re: fetch request with compound predicate doesn't sort properly
  • Next by thread: Re: fetch request with compound predicate doesn't sort properly
  • Index(es):
    • Date
    • Thread