summaryrefslogtreecommitdiff
path: root/s/shardkey.cpp
diff options
context:
space:
mode:
Diffstat (limited to 's/shardkey.cpp')
-rw-r--r--s/shardkey.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/s/shardkey.cpp b/s/shardkey.cpp
index 9602b8566e5..49458f2d7c7 100644
--- a/s/shardkey.cpp
+++ b/s/shardkey.cpp
@@ -55,7 +55,8 @@ namespace mongo {
*/
for(set<string>::const_iterator it = patternfields.begin(); it != patternfields.end(); ++it) {
- if(obj.getFieldDotted(it->c_str()).eoo())
+ BSONElement e = obj.getFieldDotted(it->c_str());
+ if(e.eoo() || e.type() == Array)
return false;
}
return true;