Skip to content

ParseQuery.order is missing in beforeFind hook #6164

@virtualtoy

Description

@virtualtoy

Is your feature request related to a problem? Please describe.
When I access query in beforeFind hook I cannot access order information.

Describe the solution you'd like
I would like to be able to retrieve order information.

Describe alternatives you've considered
So far I see no alternatives to this problem for now.

Additional context
Possible solution is to add order information data in file src/triggers.js (not sure about implications, seems pretty straightforward):

@@ -460,6 +460,9 @@ export function maybeRunQueryTrigger(
     if (restOptions.limit) {
       parseQuery._limit = restOptions.limit;
     }
+    if (restOptions.order) {
+      parseQuery._order = restOptions.order.split(',');
+    }
     count = !!restOptions.count;
   }
   const requestObject = getRequestQueryObject(

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:featureNew feature or improvement of existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions