Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // PSItemFieldMapping.m
- #import "PSItemFieldMapping.h"
- @implementation PSItemFieldMapping
- - (void)buildMappings {
- [self hasProperty:@"fieldId" forAttribute:@"field_id"];
- [self hasProperty:@"fieldType" forAttribute:@"type"];
- [self hasProperty:@"label" forAttribute:@"config/label"];
- [self hasProperty:@"required" forAttribute:@"config/required"];
- // Map values to simple NSArray property
- [self hasProperty:@"values" forAttribute:@"values"];
- }
- @end
- // PSItemMapping.m
- #import "PSItemMapping.h"
- #import "PSItemFieldMapping.h"
- @implementation PSItemMapping
- - (void)buildMappings {
- [self hasProperty:@"itemId" forAttribute:@"item_id"];
- //Fields
- [self hasRelationship: @"fields"
- forAttribute: @"fields"
- inverseProperty: @"item"
- objectMapping: [PSItemFieldMapping mapping]];
- }
- @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement