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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:59:24+00:00 2026-05-13T21:59:24+00:00

I have an abstract entity called Block which contains two attributes: column and order

  • 0

I have an abstract entity called Block which contains two attributes: column and order (which are not optional), and one relationship, thing, where it is the detail of a 1->M. I have another entity, Whatever, that has Block as its parent, and adds one attribute, someNumber.

My code looks like this:

Whatever *block = (Whatever *)[NSEntityDescription insertNewObjectForEntityForName:@"Whatever" inManagedObjectContext:managedObjectContext];
block.order = 0;
block.column = 0;
block.thing = self.thing;

When I try to save, I get this error:

Failed to save to data store: Operation could not be completed. (Cocoa error 1560.)
DetailedError: {
  NSLocalizedDescription = "Operation could not be completed. (Cocoa error 1570.)";
  NSValidationErrorKey = column;
  NSValidationErrorObject = <Whatever: 0x5124890> (entity: someWhatever; id: 0x511b4e0 <x-coredata:///Whatever/t718B63A4-927B-4D88-A9E6-7F61CF9621675> ; 
  data: {
    column = nil;
    thing = 0x54367a0 <x-coredata://E6648244-E5FC-4202-B5F9-C7A91BACF8DA/Thing/p2>;
    order = nil;
    someNumber = 0;
  });

I don’t understand why it says that column and order are nil, as I’ve just set them the line before, so this shouldn’t be a problem.

I’ve tried using the [block setColumn:0] style as well, without success.

Any help would be appreciated. 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-13T21:59:24+00:00Added an answer on May 13, 2026 at 9:59 pm

    You are setting them to nil since nil is just a null or zero pointer value.

    Core Data properties must be set to objects (as opposed to primitive types).

    Integers and floating point numbers are NSNumber objects.

    I like to use the numberWith* convenience constructors.

    For example:

    block.order = [NSNumber numberWithInteger:0];
    block.column = [NSNumber numberWithInteger:0];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 343k
  • Answers 343k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I can't run this code on the computer here at… May 14, 2026 at 5:24 am
  • Editorial Team
    Editorial Team added an answer GPS is limited to returning the latitude and longitude coordinates… May 14, 2026 at 5:24 am
  • Editorial Team
    Editorial Team added an answer Your easiest option would actually be to use the following… May 14, 2026 at 5:24 am

Related Questions

I have just installed PMD to analyze my Java project. Really nice tool, highly
I have a public static property in a class. The class has some custom
The schema: (psuedocode) I have a bean, called BaseEntity... @Entity class BaseEntity { @OneToMany
Question in title... In short - I have a WCF service exposing operations that
An upcoming project of mine is considering a design that involves (what I'm calling)

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.