Search code examples
cocoacore-datansarraycontrollermode

NSArrayController Class vs Entity mode in Core Data Mac OS X document based application


Can anyone explain differences in practise between NSArrayContoller modes (Class / Entity}?

I am just facing some debugging issues in my document based Core Data desktop application (using Entity mode for all my controllers).

My database structure became quite complicated and it takes so much time to find wrong bindings (mistyped key-paths, etc..). I have also generated classes for each entity in my data model.

Would it make any difference in tracking binding mistakes if I switched all my controllers to the Class mode?


Solution

  • Entity is for array controllers whose arrays contain Core Data managed objects.

    Class is for array controllers whose arrays contain plain (not managed) objects.

    So, no, switching an array controller that holds managed objects over to the unmanaged-object mode will not help.

    My database structure became quite complicated and it takes so much time to find wrong bindings (mistyped key-paths, etc..).

    You should get an exception about that in the Debugger Console.