Permalink
Browse files

fix a bug related to display objectids in array.

  • Loading branch information...
1 parent 662a181 commit f98b58330ed8e11f14dc343e5ce084615f00af9d @bububa committed Jun 16, 2010
Showing with 3 additions and 9 deletions.
  1. +3 −9 MongoDB.mm
View
@@ -875,15 +875,9 @@ - (NSMutableArray *) bsonArrayWrapper:(mongo::BSONObj)retval
if (hasId) {
[arr addObject:[NSString stringWithFormat:@"%d", (long long int)(e.number())]];
}
- }else if ([fieldName isEqualToString:@"_id" ]) {
- if (e.type() == mongo::jstOID)
- {
- fieldType = @"ObjectId";
- value = [NSString stringWithUTF8String:e.__oid().str().c_str()];
- }else {
- fieldType = @"String";
- value = [NSString stringWithUTF8String:e.str().c_str()];
- }
+ }else if (e.type() == mongo::jstOID) {
+ fieldType = @"ObjectId";
+ value = [NSString stringWithUTF8String:e.__oid().str().c_str()];
}else {
fieldType = @"String";
value = [NSString stringWithUTF8String:e.str().c_str()];

0 comments on commit f98b583

Please sign in to comment.