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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:55:20+00:00 2026-06-04T18:55:20+00:00

I have a Core Data Model consisting of a Trail that has-many Locations. I

  • 0

I have a Core Data Model consisting of a Trail that has-many Locations. I am also using RestKit. My code to get the trail looks like this:

Trail *trail = [Trail findFirst];

My problem is that this returns a different Trail every time. Three successive calls to [Trail findFirst] return:

<Trail: 0xf489c70> (entity: Trail; id: 0xf489a60 <x-coredata://77BCA7AD-4C71-437D-8A7C-C047B8E64567/Trail/p1> ; data: <fault>)

<Trail: 0xf476ca0> (entity: Trail; id: 0xf489110 <x-coredata://77BCA7AD-4C71-437D-8A7C-C047B8E64567/Trail/p1> ; data: <fault>)

<Trail: 0xf48c660> (entity: Trail; id: 0xf48c430 <x-coredata://77BCA7AD-4C71-437D-8A7C-C047B8E64567/Trail/p1> ; data: <fault>)

If I do [Trail allObjects] I see a single Trail item which will be returned the next time I call [Trail findFirst]. If I do [Trail allObjects] again I see a different trail object which will be returned the next time I call [Trail first];

This is bending my mind. How can CoreData be returning a different entity each time?

  • 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-06-04T18:55:22+00:00Added an answer on June 4, 2026 at 6:55 pm

    You’re looking at the wrong ID. The important one is x-coredata://77BCA7AD-4C71-437D-8A7C-C047B8E64567/Trail/p1, all of which show the same number.

    The ID you’re looking at is the address of the object(s). They are different objects but they point to the same underlying Core Data object.

    Think of a hypothetical number object. I create one and I put the number 1 in it. I create another number object and put a 1 in that one too. The objects are equal (both contain 1) but they not the same (different objects with different addresses).

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

Sidebar

Related Questions

In my core data model I have a Person entity that has a to
I have created a core data model that has two entities which have a
I have core data model with two entities that have a many-to-many relationship with
I have a core data model that has two entities, Bid and Result. I
I have a Core Data model entity NoteObject that has a transformable type arrayOfTags
I have a core data model, using the database store, that contains entities with
I have a core data model defined as follows: A User has many events.
I have an ipad application that has a simple core data model with two
I have several Core Data model version that I have added to my .xcdatamodeld
In my Core Data model I have two entities: List and Patient. List has

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.