Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grandchildren Mapping #23

Open
COSG opened this issue Jun 26, 2013 · 0 comments
Open

Grandchildren Mapping #23

COSG opened this issue Jun 26, 2013 · 0 comments

Comments

@COSG
Copy link

COSG commented Jun 26, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant