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:
_xyzbookxyzbook, 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
Post a Comment