-
-
Notifications
You must be signed in to change notification settings - Fork 980
Closed
Description
Hello,
I just wanted to know if you planned to add a built-in filter which allows us to apply all query parameters using the OR logic. I saw a lot of custom filters out there but nothing really up to date or well documented.
//...
* @ApiFilter(RangeFilter::class, properties={"productOptions.capacity"})
* @ApiFilter(OrFilter::class, properties={"productOptions.capacity"})
//...For example.
Moreover,
The following request works well:
https://127.0.0.1:8000/api/products?productOptions.capacity[gt]=10&productOptions.capacity[lt]=20
This one as well:
https://127.0.0.1:8000/api/products?productOptions.capacity[between]=400..500
But this one is not working at all:
https://127.0.0.1:8000/api/products?productOptions.capacity[between]=10..20
It returns all results (filter is not applied).
is range filter [Between] broken ?
Here is how i declare it :
/**
* Product.php
* ...
* @ApiFilter(SearchFilter::class, properties={"brand", "categories", "type", "productOptions.poolType", "productOptions.packaging"})
* @ApiFilter(RangeFilter::class, properties={"productOptions.capacity"})
*/
/**
* ProductOptions.php
* ...
* @ORM\Column(type="float", nullable=true)
* @Groups({"product_options_read", "product_options_write", "products_read", "products_write"})
*/
private $capacity;Metadata
Metadata
Assignees
Labels
No labels