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

  • Home
  • SEARCH
  • 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 6070079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:53:33+00:00 2026-05-23T09:53:33+00:00

I am trying to use an Undefined attribute that is also Transient. The attribute

  • 0

I am trying to use an Undefined attribute that is also Transient. The attribute is of type ABRecordRef (which isn’t even an object in Objective-C), and I can get the object by using the ABRecordID, which is an int32 that I persist in my model.

I made the getter pretty easily:

- (ABRecordRef) abRecordPerson
{
    ABAddressBookRef book = ABAddressBookCreate();
    ABRecordRef record = ABAddressBookGetPersonWithRecordID(book, [self.abGlobalID intValue]);
    return record;
}

This works fine, till I try to save a new object:

Person *newManagedObject = [NSEntityDescription insertNewObjectForEntityForName:[entity name] inManagedObjectContext:context];
    newManagedObject.abGlobalID = [NSNumber numberWithInt: recordID];
    //newManagedObject.abRecordPerson = person;

I get a crash whether I have the last line commented out or not. If it’s commented out, it gives me this error:

Unresolved error Error
Domain=NSCocoaErrorDomain Code=1570
“The operation couldn’t be completed.
(Cocoa error 1570.)”
UserInfo=0xe0138c0
{NSValidationErrorObject= (entity: Person; id:
0xc611e10

; data: {
abGlobalID = 6;
abRecordPerson = nil; })

It seems to think abRecordPerson is nil, so I tried to set it, but then I get this error:

CoreData: error: Property
‘setAbRecordPerson:’ is a scalar type
on class ‘Person’ that does not match
its Entity’s property’s scalar type.
Dynamically generated accessors do not
support implicit type coercion.
Cannot generate a setter method for
it.
2011-06-21 20:07:18.100
TestCoreDataLab[79616:207] -[Person
setAbRecordPerson:]: unrecognized
selector sent to instance 0x6d10f40

Any help would be greatly appreciated.

  • 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-23T09:53:34+00:00Added an answer on May 23, 2026 at 9:53 am

    So you’ve defined the getter -abRecordPerson, but have you created a -setAbPersonRecord? The error seems to indicate that you haven’t, and it looks like that’s the root of the problem.

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

Sidebar

Related Questions

I'm getting a Can't use an undefined value as a HASH reference error trying
I'm trying to get the id attribute of a tag that also calls jQuery
I am trying to use the http_get function. But I get a undefined reference
Trying to use an excpetion class which could provide location reference for XML parsing,
Trying to use this method (gist of which is use self.method_name in the FunnyHelper
I'm trying to use the google_search ruby library (code follows) but it complains that
I'm trying to add event rich snippets to my site so that Google can
I'm trying to make a simple link that will toggle my status attribute in
I'm trying to use the library gcrypt.h but show this error: undefined reference to
I'm trying to use rspec with mongoid but I'm running across this error: undefined

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.