Skip to content

Grandchildren Mapping #23

@COSG

Description

@COSG

image

How can I map FieldTemplate and ChildFieldTemplates?

I've tried this but fieldTemplate won't map:
NSDictionary *mapping = [NSDictionary dictionaryWithObjectsAndKeys:
[SheetTemplate mappingWithKey:@"" mapping:sheetTemplateMapping], @"",
[SectionTemplate mappingWithKey:@"SectionTemplates" mapping:sectionTemplateMapping], @"SectionTemplates",
[FieldTemplate mappingWithKey:@"fieldTemplates" mapping:fieldTemplateMapping], @"FieldTemplates",
nil];

My classes look like this:

@interface SheetTemplate : NSObject

@Property int SheetTemplateId;
@Property(strong) NSString *Title;
@Property int Version;
@Property(strong) NSMutableArray *SectionTemplates;

@EnD

@interface SectionTemplate : NSObject

@Property int sectionTemplateId;
@Property(strong) NSString *title;
@Property(strong) NSMutableArray *fieldTemplates;
@Property int sheetTemplateId;
@Property int rank;

@EnD

@interface FieldTemplate : NSObject

@Property int fieldTemplateId;
@Property(strong) NSString *label;
@Property int fieldType;
@Property int parentFieldTemplateId;
@Property(strong) NSMutableArray *childFieldTemplates;
@Property int sectionTemplateId;
@Property int rank;

@EnD

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions