cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From torehal...@apache.org
Subject svn commit: r451129 - /incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjectId.m
Date Fri, 29 Sep 2006 05:25:14 GMT
Author: torehalset
Date: Thu Sep 28 22:25:13 2006
New Revision: 451129

URL: http://svn.apache.org/viewvc?view=rev&rev=451129
Log:
better description and removed some debug messages

Modified:
    incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjectId.m

Modified: incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjectId.m
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjectId.m?view=diff&rev=451129&r1=451128&r2=451129
==============================================================================
--- incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjectId.m (original)
+++ incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjectId.m Thu Sep 28 22:25:13
2006
@@ -30,19 +30,18 @@
 	[self setSingleKey:[coder decodeObjectForKey:@"singleKey"]];
 	[self setSingleValue:[coder decodeObjectForKey:@"singleValue"]];
 	[self setTempKey:[coder decodeObjectForKey:@"key"]];
+	[self setReplacementIdMap:[coder decodeObjectForKey:@"replacementIdMap"]];
     
-    // TODO: fix in HessianObjC or elsewere..
+    // check/repair tempKey
     if([[self tempKey] isKindOfClass:[NSNull class]])
     {
-        NSLog(@"HACK: switching tempKey from NSNull to nil");
         [self setTempKey:nil];
     }
     else if([self tempKey])
     {
-        NSLog(@"HACK: tempKey has value %@", [self tempKey]);
+        NSLog(@"ERROR: got tempKey from server %@", self);
     }
     
-	[self setReplacementIdMap:[coder decodeObjectForKey:@"replacementIdMap"]];
 	return self;
 }
 
@@ -52,12 +51,12 @@
     [coder encodeObject:singleKey forKey:@"singleKey"];
     [coder encodeObject:singleValue forKey:@"singleValue"];
     [coder encodeObject:objectIdKeys forKey:@"objectIdKeys"];
+    [coder encodeObject:replacementIdMap forKey:@"replacementIdMap"];
     // TODO: fix problem: the key "key" result in a ugly unserialize exception at the server
side.
     if([self tempKey])
     {
         [coder encodeObject:tempKey forKey:@"key"];
     }
-    [coder encodeObject:replacementIdMap forKey:@"replacementIdMap"];
 }
 
 - (id)copyWithZone:(NSZone *)zone
@@ -196,16 +195,16 @@
     NSString *result;
     if([self tempKey])
     {
-        result = [[NSString alloc] initWithFormat:@"CAYObjectId {entityName = %@; tempKey
= %@}", [self entityName], [self tempKey]];
+        result = [[NSString alloc] initWithFormat:@"CAYObjectId {%@; tempKey = %@}", [self
entityName], [self tempKey]];
     }
     else if ([self singleKey])
     {
-        result = [[NSString alloc] initWithFormat:@"CAYObjectId {entityName = %@; singleKey
= %@; singleValue = %@}", [self entityName], [self singleKey], [self singleValue]];
+        result = [[NSString alloc] initWithFormat:@"CAYObjectId {%@; %@ = %@}", [self entityName],
[self singleKey], [self singleValue]];
     }
     else
     {
         // should match one of the above. if not, output all values
-        result = [[NSString alloc] initWithFormat:@"CAYObjectId {entityName = %@; objectIdKeys
= %@; singleKey = %@; singleValue = %@; tempKey = %@}", [self entityName], [self objectIdKeys],
[self singleKey], [self singleValue], [self tempKey]];
+        result = [[NSString alloc] initWithFormat:@"CAYObjectId {%@; objectIdKeys = %@; singleKey
= %@; singleValue = %@; tempKey = %@}", [self entityName], [self objectIdKeys], [self singleKey],
[self singleValue], [self tempKey]];
     }
     [result autorelease];
     return result;



Mime
View raw message