use firstElementFieldName()

This commit is contained in:
dwight
2011-05-23 10:49:50 -04:00
parent bd5b607137
commit 8a0660ac31
16 changed files with 28 additions and 28 deletions

View File

@@ -258,7 +258,7 @@ namespace mongo {
errors << "invalid bson object detected (see logs for more info)";
nInvalid++;
if (strcmp("_id", obj.firstElement().fieldName()) == 0){
if (strcmp("_id", obj.firstElementFieldName()) == 0){
try {
obj.firstElement().validate(); // throws on error
log() << "Invalid bson detected in " << ns << " with _id: " << obj.firstElement().toString(false) << endl;