Skip to content

limit(X), where(X), ..., have no effects on my query... #295

Closed
@ghost

Description

Hello!

Since I have migrated to a self-hosted mongodb solution, everything works fine but the "limit(X)", "where(X)" functions have no effects on my queries. I mean, when I execute a query with the Parse SDK, it returns all of the results I have in my database, with no consideration for the "where" and the "limit" conditions.

For example, this query returns everything even if the "approved" parameter is set to false and without limiting the number of results...

// Fetch Videos
$fetch_videos_query = new Parse\ParseQuery("Video");
$video_results = null;

// Show only approved video on home
$fetch_videos_query->descending("createdAt");
$fetch_videos_query->includeKey("author");
$fetch_videos_query->equalTo("approved", true);
$fetch_videos_query->limit(2);

$video_results = $fetch_videos_query->find();

Do you know what is wrong in my code ?

Thanks,
Axel

EDIT : Sorry, it can be closed. I updated the Parse-server to the latest version and it now works well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions