loopback-next icon indicating copy to clipboard operation
loopback-next copied to clipboard

Rest filter is not working properly

Open frbuceta opened this issue 2 years ago • 0 comments

Describe the bug

Query parameters sent by rest: Captura de pantalla de 2022-03-03 11-20-25

Parameters received by LoopBack:

{
  "offset": 0,
  "limit": 10,
  "include": [
    "images"
  ],
  "where": {
    "attributes": {
      "or": [
        {
          "and": {
            "[0][key]": "COLECCIÓN",
            "[0][value]": "100% MARVEL",
            "[1][key]": "MATERIA",
            "[1][value]": "MARVEL"
          }
        }
      ]
    }
  }
}

Parameters expected by LoopBack:

{
  "offset": 0,
  "limit": 10,
  "include": [
    "images"
  ],
  "where": {
    "attributes": {
      "or": [
        {
          "and": [
            { "key": "COLECCIÓN", "value": "100% MARVEL" },
            { "key": "MATERIA", "value": "MARVEL" }
          ]
        }
      ]
    }
  }
}

Therefore the functionality described in the documentation does not work.

Logs

No response

Additional information

No response

Reproduction

N/A

frbuceta avatar Mar 03 '22 10:03 frbuceta