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'
    )
));

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top