How do I access a child class's reference to a managed object?

Discussion in 'iOS Programming' started by moonman239, Nov 6, 2013.

  1. moonman239 macrumors 68000

    Joined:
    Mar 27, 2009
    #1
    I have a parent class whose child classes are each assigned a different managed object. Each managed object is a subclass of NSManagedObject and is assigned to a different entity in my data model. My entities share attribute names; therefore, my managed objects share property names.

    In the parent class's .m file, I want to insert code that will edit one of the properties of the currently-active child class's managed objects. How should I do this?
     
  2. TheWatchfulOne macrumors 6502

    Joined:
    Jun 19, 2009
    #2
    Would you mind posting the code from the header files of your NSManagedObject subclasses?

    Are the relationships to-one or to-many?

    Are you using Core Data?

    Did you ever solve your EXEC_BAD_ACCESS problem? I hear it's good practice to fix bugs before adding new functionality.
     
  3. MattInOz macrumors 68030

    MattInOz

    Joined:
    Jan 19, 2006
    Location:
    Sydney
    #3
    You might want to post an Image of the Object Map for you data model.

    If I think I understand what you are saying there could be a couple of different model set-ups with slightly different answers.
     

Share This Page