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 6952797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:23:43+00:00 2026-05-27T14:23:43+00:00

I am missing the methods compoundIndexes setCompoundIndexes in NSEntityDescription in the Mac OS X

  • 0

I am missing the methods

  • compoundIndexes
  • setCompoundIndexes

in NSEntityDescription in the Mac OS X 10.7 SDK. It is however, available in the iOS5.0 SDK.

Xcode on the other hand knows very well about compound indexes, even under Mac OS X. It creates xcdatamodels like this:

<entity name="OHLCV" parentEntity="Sample" syncable="YES">
    <attribute name="close" attributeType="Double" defaultValueString="0.0" syncable="YES"/>
    <attribute name="high" attributeType="Double" defaultValueString="0.0" syncable="YES"/>
    <attribute name="low" attributeType="Double" defaultValueString="0.0" syncable="YES"/>
    <attribute name="open" attributeType="Double" defaultValueString="0.0" syncable="YES"/>
    <attribute name="volume" attributeType="Integer 64" defaultValueString="0" syncable="YES"/>
    <compoundIndexes>
        <compoundIndex>
            <index value="open"/>
            <index value="close"/>
        </compoundIndex>
    </compoundIndexes>
</entity>

Can it be that Apple just forgot to include declarations of the methods in the Mac API?

Here are the docs:

Mac: http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/CoreDataFramework/Classes/NSEntityDescription_Class/NSEntityDescription.html (here the section for managing compound indexes is missing)

iOS: http://developer.apple.com/library/ios/#documentation/Cocoa/Reference/CoreDataFramework/Classes/NSEntityDescription_Class/NSEntityDescription.html

  • 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-27T14:23:43+00:00Added an answer on May 27, 2026 at 2:23 pm

    I have managed to call the undeclared method by declaring it myself (needs to be declared so that the compiler accepts it):

    @interface NSEntityDescription ()
    - (void)setCompoundIndexes:(NSArray*)anArray;
    @end
    

    later in my code, where I create my NSManagedObjectModel programmatically I can call it:

    [entity setCompoundIndexes:
        [NSArray arrayWithObjects:[NSArray arrayWithObjects:@"open", @"close", nil], nil]
    ];
    

    I think Apple has just forgotten to put the methods into the CoreData API. The feature is definitely available also on Mac OS X, otherwise Xcode would not offer a UI in the xcdatamodel modelling tool.

    I can further confirm that the above statements are working, because I found the corresponding compound index created by CoreData in the sqlite3 database:

    CREATE INDEX ZOHLCV_ZOPEN_ZCLOSE ON ZOHLV (ZOPEN, ZCLOSE);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Perhaps I'm missing something with the concept of Extension Methods, but I cannot gain
I'm learning metaprogramming in Ruby and am just trying out defining missing methods via
I'm clearly missing something here. I need to fill methods of dynamic AS3 class
QPolygonF has methods to union, intersect, and subtract with other QPolygonFs but I need
In picture : How does AsEnumerable Methods Knows that the type should be DataRow
I know I'm missing one important rule about static methods but would would be
I have a feeling I'm missing something very simple here. I have a class
I must be missing something. I'm trying to stub methods on a class in
Am I missing something or do closures simply not work as class methods? Take
Unless I am missing an obvious built-in method, what is the quickest way to

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.