objective c - Unexpected behaviour for isKindOfClass: on NSManagedSubclasses created by mogenerator -


i have entity in object model called book class attribute xyzbook. mogenerator creates 2 classes:

  • _xyzbook
  • xyzbook, inherits _xyzbook.

so far good.

if create instance on xyzbook:

xyzbook *b = [xyzbook insertinmanagedobjectcontext:context]; 

sending class b, returns xyzbook expected.

[b class] --> xyzbook 

however, sending ismemberofclass:[xyzbook class] returns no!!!

[b ismemberofclass:[xyzbook class]] --> no 

it returns yes if use _xyzbook super class:

[b ismemberofclass:[_xyzbook class]] --> yes 

so, on earth going on????

btw, create these clases using custom base class (with --base-class option mogenerator). in case has this...


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -