From 5c9c6887c5e6bc2a89812e3c44bf64f61aac6fb1 Mon Sep 17 00:00:00 2001 From: Joan Martin Date: Mon, 3 Oct 2016 08:13:24 -0400 Subject: [PATCH] removing assert and showing a log in object ID coding --- Source/PMObjectID.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/PMObjectID.m b/Source/PMObjectID.m index 15d4a25..fbaf751 100644 --- a/Source/PMObjectID.m +++ b/Source/PMObjectID.m @@ -84,7 +84,8 @@ - (id)initWithCoder:(PMKeyedArchiver*)aDecoder - (void)encodeWithCoder:(PMKeyedUnarchiver*)aCoder { - NSAssert(_temporaryID == NO, @"When encoding, the object ID cannot be temporal"); + if (_temporaryID) + NSLog(@"WARNING: storing an object ID for type <%@> with a temprorary ID.", _type); [aCoder encodeInteger:_dbID forKey:@"dbID"]; [aCoder encodeObject:_type forKey:@"type"];