Skip to content

projection $slice error #265

@lanlin

Description

@lanlin

Enviroment
PHP: 7.0.11
Library: 1.0.3
Mongodb: 3.2.9
Extension: mongodb-1.2.0alpha3

When i make a query using the mongo-php-library as this

$collection->find([], 
    [
        'projection' => [ 'users' => ['$slice' => 10] ]
    ]
);

I got an error:
Cannot use $-modifiers or empty keys in 'opts'.

Can anyone help me?
Is the '$slice' deperated?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions