From 77e50db2bb67a55da052986d03e0d64a16a2581a Mon Sep 17 00:00:00 2001 From: Amber Star Date: Sun, 22 Nov 2015 14:50:20 -0500 Subject: [PATCH] set optional to no by default unless it appears in XML attributes --- momcom/NSPropertyDescription+momcom.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/momcom/NSPropertyDescription+momcom.m b/momcom/NSPropertyDescription+momcom.m index 1e9841c..d851b49 100644 --- a/momcom/NSPropertyDescription+momcom.m +++ b/momcom/NSPropertyDescription+momcom.m @@ -19,6 +19,9 @@ + (id)baseEntityForXML:(NSXMLElement *)xmlNode } NSPropertyDescription *propertyDescription = [[self alloc] init]; + // set optional to `NO`, unless it appears in XML attributes + propertyDescription.optional = NO; + BOOL syncable = NO; for (NSXMLNode *xmlAttribute in [xmlNode attributes]) {