8

I am new for iOS RestKit framework. I have read the document and still can not figure out the differences between "attribute" and "property" in RestKit.

Since in the document, there are

- addPropertyMappingsFromArray:

and

– addAttributeMappingsFromArray:

I know that while assigning relationship, I should use the first one. However, I still cannot truly understand the differences.

Brian
  • 30,156
  • 15
  • 86
  • 87
Ray Shih
  • 933
  • 8
  • 18

1 Answers1

5

I just ran into this myself. The naming could definitely be clearer.

- addAttributeMappingsFromArray: refers to what you would expect: mappings of class attributes. - addPropertyMappingsFromArray: on the other hand refers to RKPropertyMapping objects.

If you take a look at the RestKit source you'll see that all the 'addAttributeMappings' methods are a handy abstraction on top of the 'addPropertyMappings' methods, and take care of constructing the required RKPropertyMapping objects for you.

kurige
  • 3,749
  • 2
  • 21
  • 24