Skip to content

Allow a query to sort based on an object value field #4805

@acinader

Description

@acinader

Currently, if one tries to sort a query on a field in an object field, parse generates an error:

Type: Parse\ParseException
Code: 105
Message: Invalid field name: trendRankTopic.popular.

due to the check in the database controller here:

if (!SchemaController.fieldNameIsValid(fieldName)) {

This is not the same, though related to: #2113

An example would be an object:

{ sortField: { value: 10 } }

with a Query:

new Parse.Query('Test').addAscending('sortField.value').first()

generates the above error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions