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

@@ -141,7 +141,7 @@ namespace mongo {
const char* ns = jsobj.getStringField( "checkShardingIndex" );
BSONObj keyPattern = jsobj.getObjectField( "keyPattern" );
if ( keyPattern.nFields() == 1 && str::equals( "_id" , keyPattern.firstElement().fieldName() ) ) {
if ( keyPattern.nFields() == 1 && str::equals( "_id" , keyPattern.firstElementFieldName() ) ) {
result.appendBool( "idskip" , true );
return true;
}