views:

15

answers:

0

Hello everyone,

I've been pulling my hair for the last few hours trying to figure out why insertNewObjectForEntityForName is returning NSManagedObject even though I'm trying to insert an entity of my own type.

Things I have checked a thousand times:

  • Class name is set to the correct value in the diagram designer
  • Entity has many-to-many relationship with another entity, creating that other entity works as expected and I do get the properly typed output, I swear they are identical

What are the possible reasons why this could be happening? I don't know where to look from here, and google didn't help much :(

EDIT (RESOLVED):

This had to do with versioning... I removed the data model and recreated it again, and everything started working, before there were a few versions that were previously used... sigh sometimes asking a question gives an idea of how to find a solution

I'm still confused of why that was happening, even though it's solved now