Skip to content

Double filters in querystring #100

Open
@marcvan-dijk

Description

@marcvan-dijk

Hi Sean,

First of all, thanks for your package, it saves a lot of time creating those queries. I'm facing an issue that deeper objects result in double queries. Please consider the following object:

{
    "filter": {
        "Nomination": {
            "ScheduledAt": {
                "ge": "2021-12-12T23:00:00.000Z",
                "le": "2021-12-13T22:59:59.999Z"
            },
            "NominationStatusValues": {
                "any": {
                    "NominationStatusID": 3
                }
            }
        }
    },
    "orderBy": "id",
    "count": true,
    "top": 15
}

this results in the following querystring (with some enters for readability):

$filter=
Nomination/ScheduledAt ge 2021-12-12T23:00:00.000Z and 
Nomination/ScheduledAt le 2021-12-13T22:59:59.999Z and 
Nomination/NominationStatusValues/any(nominationstatusvalues:nominationstatusvalues/NominationStatusID eq 3) and 
Nomination/ScheduledAt ge 2021-12-12T23:00:00.000Z and 
Nomination/ScheduledAt le 2021-12-13T22:59:59.999Z and 
Nomination/NominationStatusValues/any(nominationstatusvalues:nominationstatusvalues/NominationStatusID eq 3)
&$orderby=id&$count=true&$top=15

Am I doing something wrong or did I stumble upon a bug? I've tried several versions (6.7.1, 6.7.0, 6.6.0) but to no avail.

Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions