Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1051911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:00:37+00:00 2026-05-16T17:00:37+00:00

My document-based Cocoa application uses a NSOutlineView/NSTreeController combo, bound to the document’s Core Data

  • 0

My document-based Cocoa application uses a NSOutlineView/NSTreeController combo, bound to the document’s Core Data store. My NSTreeController has the fetch predicate isRoot == YES. isRoot is a transient boolean attribute with a default value of NO. My root model’s awakeFromInsert calls:

[self setIsRoot:[NSNumber numberWithBool:YES]];

I’m able to add objects to the hierarchy just fine, but when I try to load a document I just saved, I get an exception:

[<NSDictionaryMapNode 0x1001a8190> valueForUndefinedKey:]: this class is not key value coding-compliant for the key isRoot.

I can work around this exception and successfully load a newly-saved document if I change the isRoot attribute to non-transient in the xcdatamodel, but based on my understanding of the transient flag it should not cause a problem, and this really isn’t the kind of data that should be persisted.

I have also tried implementing -isRoot in the NSManagedObject subclasses to return the appropriate fixed value, as well as making the same setIsRoot: call within awakeFromFetch, both to no avail.

Is there some other subtlety I’m missing? I can’t imagine that fetch predicates don’t support transient attributes. I don’t know much about the inner workings of Core Data but it seems interesting that it’s trying to look up isRoot on the store-specific class and not my NSManagedObject subclass.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T17:00:37+00:00Added an answer on May 16, 2026 at 5:00 pm

    I can’t imagine that fetch predicates
    don’t support transient attributes.

    After a bit of research, I can tell you that they don’t. See this document. Quote:

    You cannot fetch using a predicate
    based on transient properties
    (although you can use transient
    properties to filter in memory
    yourself).

    I’ve put together a test project and can verify I get exactly the same error as you do.

    When I need to filter out the root nodes in a tree, I use a fetch predicate of parent == nil instead of a transient attribute.

    I understand your reaction – I too wanted way of having an attribute specifically called isRoot too. My guess is it’s possible, but it’d take so much code it’s just not worth the hassle.

    Oh, and if you’re dealing with core data any more than a little, mogenerator will make your life much easier.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Environment: xcode 3.2.1, document-based core-data application. I have a document-based cocoa app which uses
I have a non document-based Core Data application. There's an NSTreeController that manages a
I have a document-based Core Data app. My main Core Data entity has several
I've followed the instructions to integrate spotlight into a non-document based Core Data application
I have a document-based Core Data application (running on Mac OS X 10.5 and
I have a Document based core data app. The main document window has a
Each time I create any type of cocoa project (document-based, with core-data and/or spotlight
I have a document-based Cocoa application that has to start up a sub-process before
I have a Cocoa, Document-based Mac OS X application. One feature that I have
From my VB application I am generating XML document based on data fetched from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.