elado/jastor

support for inheritance?

Closed this issue · 5 comments

Any plan to support for inheritance?

ProductCommon : jastor
{
commonAttributes;
}

Product1 : ProductCommon
{
product1_specific;
}

Product2 : ProductCommon
{
product2_specific;
}

Not currently, though pull requests are welcome.

I implemented this and was about to do pull requests. but found it's already there in current version.

relavant bits of codes are ..

JastorRuntimeHelper.m
NSArray* arr = [JastorRuntimeHelper propertyNames:class_getSuperclass(klass)];
[propertyNamesArray addObjectsFromArray:arr];

//this will support traversing the inheritance chain
return [self propertyClassForPropertyName:propertyName ofClass:class_getSuperclass(klass)];

Oh cool. Thanks @yosit for that :)

;) you are welcome.

Hi @yosit , do you have a working example?