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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:55:03+00:00 2026-05-28T01:55:03+00:00

I have an attribute synced of type Integer16 in my core-data model. I am

  • 0

I have an attribute synced of type Integer16 in my core-data model. I am trying to set the value of synced to [NSNumber numberWithBool:YES], when the value is synced with that on my server, just like I do on many of the other managed object subclasses I have in my app. The problem is, that for this particular class, any time I call [context save:], the value gets reset to [NSNumber numberWithBool:NO].

My suspicion was that I might have another instance of that object in my code somewhere that has synced set to NO, but I’m fairly certain that this is not the case. Can anyone offer me some advice to help resolve this issue?

Thanks!

  • 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-28T01:55:04+00:00Added an answer on May 28, 2026 at 1:55 am

    Kind of hard without any real code but things you could try:

    Override the setter and place a break point so you can see when it is being called.

    - (void)set<#Capitalized property name#>:(<#Property type#> *)value
    {
        [self willChangeValueForKey:@"<#Property name#>"];
        [self setPrimitiveValue:value forKey:@"<#Property name#>"];
        [self didChangeValueForKey:@"<#Property name#>"];
    }
    

    OR try using KVO for the same purpose (see when the values being changed)

    [theObject addObserver:theObserver forKeyPath:@"keyPath" options:0 context:nil];
    

    Make sure you have not overridden willSave with anything that is changing the value.


    Check it is definitely the same object that was saved/fetched?

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

Sidebar

Related Questions

I have an attribute in a Core Data Managed Object that I'm trying to
I have a bunch of input text boxes that have the attribute ORIGINAL set
I know that: If attribute have backend_type is int/varchar/datetime , it's value will be
I know that [my_attr='my_value'] refers to all elements which have attribute my_attr with value
I need to have following attribute value in my XML node: CommandLine=copy $(TargetPath) ..\..\&#x0D;&#x0A;echo
I know I could have an attribute but that's more work than I want
I would like to select all elements that have certain attribute or don't have
In my user model, I have an attribute called nickname and validates as such:
I have a filter attribute that I'd like to be applied to every action
I have attribute value as: <div id = 2fComponents-2fPromotion-2f class = promotion> Now I

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.