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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:48:57+00:00 2026-05-20T02:48:57+00:00

I am trying to add objects to a persistent store in Core Data. When

  • 0

I am trying to add objects to a persistent store in Core Data.
When the user taps the save button I initialize a new object which is a subclass of the NSManagedObject class and in the data model.

Profile *newProfile = [[Profile alloc] initWithEntity:[NSEntityDescription entityForName:@"Profile" inManagedObjectContext:MOC] insertIntoManagedObjectContext:MOC];

[newProfile setValue:userName.text forKey:@"userName"];
[newProfile setValue:txtInstitution.text forKey:@"institution"];

I can verify in the console that the values for userName and txtInstitution are correct and what expected, and also that the object has the proper attributes. However, it seems to save the object with the same values as whatever the first object saved was. Only one profile is created at a time, and the MOC is saved after each profile is added in this way.

Also, when a table tries to populate with data from the persistent store it will create rows as though are as many objects in the store as I have created at that time, but they will all have the same values.

  • 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-20T02:48:57+00:00Added an answer on May 20, 2026 at 2:48 am

    Are you sure you are retrieving the objects from the store correctly? This sounds like it might be an issue with the fetch request you use to get the data out of the store and/or an issue with the way you display the data.

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

Sidebar

Related Questions

I'm using JPA2 and Hibernate implementation. I'm trying to persist a User object, which
I'm new with vectors. I'm trying to add objects to a vector. But the
I am trying to have a bunch of Core Data objects (NSStrings) be added
Im trying to add two objects, which is created from one part, but since
I'm trying to add objects to NSMutableArray (categoriasArray), but its not done by the
I am trying to add an attirubute to objects that i created.Here i created
I'm trying to add two object that they are in the same class. In
Trying to add a class object into a List using reflection, but when invoking
I am trying to add the datetime object of a person. Whenever the birth
I'm trying to add results from an object to newly created HTML elements: *long

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.