Question

This code is working fine:

$posts = Posts::all(array(
    'conditions' => array(
        'design' => 'posts', 'view' => 'all',
        'limit' => 10, 'descending' => 'true'
    )
));

It queries all Posts documents.

But when you use filter by key it doesn't work:

$posts = Posts::all(array(
    'conditions' => array(
        'design' => 'posts', 'view' => 'all',
        'key' => 'title',
        'limit' => 10, 'descending' => 'true'
    )
));

Any ideas on how to filter design document by key?

Update:

This query works fine: 'key' => '"title"' with double quote

$posts = Posts::all(array(
    'conditions' => array(
        'design' => 'posts', 'view' => 'all',
        'key' => '"title"',
        'limit' => 10, 'descending' => 'true'
    )
));

Pas de solution correcte

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top