Hy,
Model Item
Model Image
Model User
Image and User are extending Item. Item extends polymodel.PolyModel.
Now I have a Model named List. Each Item has a list.
Then I query all the Items for that list and I get an array of Items.
Now I want to loop each object and add a property named ‘type’ and set it’s type(Image|User).
Can somebody help me out?
You don’t need to do that. The following should get you the class type for each object: