Skip to content

Commit 72fcb05

Browse files
author
Shan Haq
committed
fixed nested model object issue
1 parent 4905dd6 commit 72fcb05

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

SHModelObject/SHModelObject/SHModelObject.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ - (void)serializeValue:(id)value withKey:(id)key {
409409
for (id item in value) {
410410
// item should be a dictionary
411411
if ([item isKindOfClass:[NSDictionary class]]) {
412-
id itemObject = [objectClass objectWithDictionary:item];
412+
id itemObject = [objectClass objectWithDictionary:item mappings:_mappings];
413413
if (itemObject) {
414414
[valueArray addObject:itemObject];
415415
}

SHModelObject/SHModelObject/SHRealmObject.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ - (void)serializeValue:(id)value withKey:(id)key {
417417
for (id item in value) {
418418
// item should be a dictionary
419419
if ([item isKindOfClass:[NSDictionary class]]) {
420-
id itemObject = [objectClass objectWithDictionary:item];
420+
id itemObject = [objectClass objectWithDictionary:item mappings:_mappings];
421421
if (itemObject) {
422422
if ([realmArray respondsToSelector:@selector(addObject:)]) {
423423
[realmArray addObject:itemObject];

0 commit comments

Comments
 (0)