Permalink
Browse files

MongoDB::Cursor::hint() requires ordered hashes.

  • Loading branch information...
1 parent e990505 commit 58bcf893e645f3fa7450d591a4b50628b90c64e2 @SailingYYC SailingYYC committed Jan 19, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/MongoDB/Cursor.pm
View
@@ -408,7 +408,7 @@ sub hint {
confess "cannot set hint after querying"
if $self->started_iterating;
confess 'not a hash reference'
- unless ref $index eq 'HASH';
+ unless ref $index eq 'HASH' || ref $index eq 'Tie::IxHash';
$self->_ensure_special;
$self->_query->{'$hint'} = $index;

0 comments on commit 58bcf89

Please sign in to comment.