• 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
How to make Fetched Property SELF constrinat?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to make Fetched Property SELF constrinat?


  • Subject: How to make Fetched Property SELF constrinat?
  • From: Javigator <email@hidden>
  • Date: Tue, 5 Jul 2005 12:00:55 +0200

Another day, another problem:

Situation: I have a too-many-relationship "folder <---->> item", thus one folder can contain many items and every item has exeactly one folder. So far so good.
I was experimenting with Fetched Properties and thought it would be nice to attach two of those to my "folder" structure to distinguish between 'enabled' and 'disabled' items of a folder (an item has a bool flag "disabled"). But I didn't came very far, at least in the data model editor in Xcode.


The problem is: I cannot figure out out how to self constain a folder in the Predicate Editor of the Fetched Property in Xcode. Programatically I would have done it with two accessor methods - (unsigned)disabledItems / -(unsigned)enabledItems where both aquire the [[self valueForKey:@"items"] allObjects] array - because of the relationship already constrained to the current folder object - and filter that with a predicate of "disabled == TRUE" (or FALSE, respectively)... this works as expected. Well, I'm thinking that for the predicate editor in Xcode I need something like "folder == SELF AND disabled = TRUE" with "item" as destination, but that doesn't work. Woking from the "folder" end of the relationship doesn't work either, at least for me and my tries with the predicate syntax.

Am I overlooking something here? Is this impossible to do with the predicate editor in the data model of Xcode? Has anyone else got a solution to this kind of problem and can point me to it?

Best regards,
Joern Janoschek.



_______________________________________________
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: How to make Fetched Property SELF constrinat?
      • From: Andy Lee <email@hidden>
    • Re: How to make Fetched Property SELF constrinat?
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: Changing startup desk
  • Next by Date: HTTP(S) proxy on 10.1+
  • Previous by thread: Re: DO and NSProxy
  • Next by thread: Re: How to make Fetched Property SELF constrinat?
  • Index(es):
    • Date
    • Thread